You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// This is taken from json_serializable
QAccount1 _$QAccountFromJson(Map<String, dynamic> json) {
return QAccount1(
id: json['email'] as String,
name: json['username'] as String,
avatarUrl: json['avatar_url'] as String,
extras: json['extras'] as Map<String, dynamic>,
lastMessageId: json['last_comment_id'] as int,
lastEventId: json['last_sync_event_id'] as int,
);
}
but the actual generated code are:
_$_QAccount1 _$_$_QAccount1FromJson(Map<String, dynamic> json) {
return _$_QAccount1(
id: json['id'] as String,
name: json['name'] as String,
avatarUrl: json['avatarUrl'] as String,
extras: json['extras'] as Map<String, dynamic>,
lastMessageId: json['lastMessageId'] as String,
lastEventId: json['lastEventId'] as String,
);
}
As you can see, generated code still using id instead of email
The text was updated successfully, but these errors were encountered:
Ah yeah, seems like I got interested on freezed after reading a tutorial about it, and just copy paste from the tutorial without checking the latest version.
Thanks.
For example I have the following code:
Freezed should generate:
but the actual generated code are:
As you can see, generated code still using
id
instead ofemail
The text was updated successfully, but these errors were encountered: