From 64a04a36fc1ad2d26dc4e8413b326fc4d257186f Mon Sep 17 00:00:00 2001 From: DuvCabrera <86318128+DuvCabrera@users.noreply.github.com> Date: Tue, 6 Jan 2026 16:40:43 -0300 Subject: [PATCH] Add id property to Athlete class Updated Athlete class to include an id property and modified the fromJson factory method to initialize it. --- lib/src/domain/model/model_authentication_response.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/src/domain/model/model_authentication_response.dart b/lib/src/domain/model/model_authentication_response.dart index c39a940..9d73c6f 100644 --- a/lib/src/domain/model/model_authentication_response.dart +++ b/lib/src/domain/model/model_authentication_response.dart @@ -65,13 +65,14 @@ class TokenResponse { } class Athlete { - Athlete(); + int id; + Athlete(required this.id); factory Athlete.fromRawJson(String str) => Athlete.fromJson(json.decode(str)); String toRawJson() => json.encode(toJson()); - factory Athlete.fromJson(Map json) => Athlete(); + factory Athlete.fromJson(Map json) => Athlete(id:json["id"]); Map toJson() => {}; }