Object to Map serializer
@override Map<String, dynamic> toJson() { return { '@type': 'backgroundTypeFill', if (extra != null) '@extra': extra, 'fill': fill }; }