fix json serialization nnbd

This commit is contained in:
Salvatore Giordano
2021-04-14 15:34:52 +02:00
parent 45c1e31509
commit 2d11e32700
9 changed files with 24 additions and 23 deletions
@@ -21,8 +21,8 @@ class User {
updatedAt = updatedAt ?? DateTime.now();
/// Create a new instance from a json
factory User.fromJson(Map<String, dynamic>? json) => _$UserFromJson(
Serialization.moveToExtraDataFromRoot(json, topLevelFields)!);
factory User.fromJson(Map<String, dynamic> json) => _$UserFromJson(
Serialization.moveToExtraDataFromRoot(json, topLevelFields));
/// Use this named constructor to create a new user instance
User.init(