toJson method

Map<String, dynamic> toJson()

Produces a Map that can be serialized to JSON.

Implementation

Map<String, dynamic> toJson() {
  return {
    ...?unknown,
    if (name != null) 'name': name,
    if (version != null) 'version': version,
  };
}