toJson method
Convert the object to a Json format.
Implementation
@override
Object toJson() => <Object>[
type,
<String, Object?>{
if (backgroundColor != null)
'backgroundColor': backgroundColor?.toARGB32(),
if (borderColor != null) 'borderColor': borderColor?.toARGB32(),
if (glyph != null) 'glyph': glyph?.toJson(),
},
];