createFactory property

bool? createFactory
final

If true (the default), a private, static _$ExampleFromJson method is created in the generated part file.

Call this method from a factory constructor added to the source class:

@JsonSerializable()
class Example {
  // ...
  factory Example.fromJson(Map<String, dynamic> json) =>
    _$ExampleFromJson(json);
}

Implementation

final bool? createFactory;