@jsEnum
class MapTypeStyleElementType extends JsEnum {
static final values = <MapTypeStyleElementType>[
ALL,
GEOMETRY,
GEOMETRY_FILL,
GEOMETRY_STROKE,
LABELS,
LABELS_ICON,
LABELS_TEXT,
LABELS_TEXT_FILL,
LABELS_TEXT_STROKE
];
static final ALL = new MapTypeStyleElementType._('all');
static final GEOMETRY = new MapTypeStyleElementType._('geometry');
static final GEOMETRY_FILL = new MapTypeStyleElementType._('geometry.fill');
static final GEOMETRY_STROKE =
new MapTypeStyleElementType._('geometry.stroke');
static final LABELS = new MapTypeStyleElementType._('labels');
static final LABELS_ICON = new MapTypeStyleElementType._('labels.icon');
static final LABELS_TEXT = new MapTypeStyleElementType._('labels.text');
static final LABELS_TEXT_FILL =
new MapTypeStyleElementType._('labels.text.fill');
static final LABELS_TEXT_STROKE =
new MapTypeStyleElementType._('labels.text.stroke');
MapTypeStyleElementType._(o) : super.created(o);
}
I was trying to create a parser for JSON created with https://mapstyle.withgoogle.com/. As the constructor of MapTypeStyleElementType is private there is no possibility (which I found) to find the correct Enum value for a correlating String value. If I have 'geometry' as a String - how do I get the Enum for it?
Example:
I was trying to create a parser for JSON created with https://mapstyle.withgoogle.com/. As the constructor of MapTypeStyleElementType is private there is no possibility (which I found) to find the correct Enum value for a correlating String value. If I have 'geometry' as a String - how do I get the Enum for it?