I'm trying to use @JsonKey(fromJson: (j)=>j) to make the entire json map available as a field. I get the error Arguments of a constant creation must be constant expressions.
Am I doing something wrong? Or has there been an API change?
@JsonSerializable(createToJson: false)
class Entry {
final int id;
@JsonKey(fromJson: _dataFromJson)
final Map<String, dynamic> data;
Entry(this.id, this.data);
_dataFromJson(Map<String, dynamic> input) => input;
factory Entry.fromJson(Map<String, dynamic> json) => _$EntryFromJson(json);
}

Ah, its gotta be a static member.
Most helpful comment
Ah, its gotta be a static member.