diff --git a/recipients_app/lib/data/models/phone.dart b/recipients_app/lib/data/models/phone.dart index 23ce985c6..234bb7984 100644 --- a/recipients_app/lib/data/models/phone.dart +++ b/recipients_app/lib/data/models/phone.dart @@ -5,7 +5,7 @@ part "phone.g.dart"; @JsonSerializable() class Phone extends Equatable { - @JsonKey(name: "phone") + @JsonKey(name: "phone", defaultValue: 0) final int phoneNumber; const Phone(this.phoneNumber); diff --git a/recipients_app/lib/data/models/phone.g.dart b/recipients_app/lib/data/models/phone.g.dart index 8a0a81a8f..035247bac 100644 --- a/recipients_app/lib/data/models/phone.g.dart +++ b/recipients_app/lib/data/models/phone.g.dart @@ -7,7 +7,7 @@ part of 'phone.dart'; // ************************************************************************** Phone _$PhoneFromJson(Map json) => Phone( - json['phone'] as int, + json['phone'] as int? ?? 0, ); Map _$PhoneToJson(Phone instance) => {