toJson method

  1. @override
Map<String, dynamic> toJson()
override

Converts the object to a JSON representation.

Returns the JSON representation of the object.

Implementation

@override
Map<String, dynamic> toJson() {
  return {
    if (prettyName != null) 'prettyName': prettyName,
    if (defaultOutput != null) 'defaultOutput': defaultOutput,
    if (denylists != null) 'denylists': denylists?.toJson(),
    if (requiresGenerators != null) 'requiresGenerators': requiresGenerators,
    if (requiresEngines != null) 'requiresEngines': requiresEngines,
    if (requiresEngineVersion != null)
      'requiresEngineVersion': requiresEngineVersion,
    if (version != null) 'version': version,
  };
}