toJson method
Must include path; the rest is whatever the plugin needs.
Implementation
@override
Map<String, Object?> toJson() => {
...super.toJson(),
// As written, shorthand keys and all — the same author's-word rule as
// `Entrypoint.platforms`.
if (flavors.isNotEmpty)
'flavors': {
for (var entry in flavors.entries) entry.key.name: entry.value,
},
if (entrypoints.isNotEmpty)
'entrypoints': [for (var e in entrypoints) e.toJson()],
};