Convert the object to a Json format.
@override Object toJson() { return <Object>[ 'textGlyph', <String, Object>{'text': text, if (textColor != null) 'textColor': textColor!.toARGB32()}, ]; }