genericArgumentFactories property

bool genericArgumentFactories
final

Whether to enable the genericArgumentFactories feature of JsonSerializable

Defaults to false.

This changes fromJson(Map json) => _$ExampleFromJson(json) to have an additional parameter for each type parameter for the class

@freezed
class Example<T> with _$Example<T> {
  factory Example<T>(T a) = _Example;

  factory Example.fromJson(Map<String, Object?> json, T Function(Object?) fromJsonT) => _$ExampleFromJson(json, fromJsonT);
}

Implementation

final bool genericArgumentFactories;