I'm using a private constructor in my class, but the code generation fails with
The class
Foohas no default constructor.
I'm using latest json_serializable: version i.e. 6.1.5:
@JsonSerializable()
class Foo {
final int count;
Foo._(this.count);
factory Foo.fromJson(Map<String, dynamic> json) => _$Foo._FromJson(json);
}
What am I doing wrong?