Implementation
static PointAnnotation decode(Object message) {
final Map<Object?, Object?> pigeonMap = message as Map<Object?, Object?>;
return PointAnnotation(
id: pigeonMap['id']! as String,
geometry: (pigeonMap['geometry'] as Map<Object?, Object?>?)
?.cast<String?, Object?>(),
image: pigeonMap['image'] as Uint8List?,
iconAnchor: pigeonMap['iconAnchor'] != null
? IconAnchor.values[pigeonMap['iconAnchor']! as int]
: null,
iconImage: pigeonMap['iconImage'] as String?,
iconOffset: (pigeonMap['iconOffset'] as List<Object?>?)?.cast<double?>(),
iconRotate: pigeonMap['iconRotate'] as double?,
iconSize: pigeonMap['iconSize'] as double?,
symbolSortKey: pigeonMap['symbolSortKey'] as double?,
textAnchor: pigeonMap['textAnchor'] != null
? TextAnchor.values[pigeonMap['textAnchor']! as int]
: null,
textField: pigeonMap['textField'] as String?,
textJustify: pigeonMap['textJustify'] != null
? TextJustify.values[pigeonMap['textJustify']! as int]
: null,
textLetterSpacing: pigeonMap['textLetterSpacing'] as double?,
textMaxWidth: pigeonMap['textMaxWidth'] as double?,
textOffset: (pigeonMap['textOffset'] as List<Object?>?)?.cast<double?>(),
textRadialOffset: pigeonMap['textRadialOffset'] as double?,
textRotate: pigeonMap['textRotate'] as double?,
textSize: pigeonMap['textSize'] as double?,
textTransform: pigeonMap['textTransform'] != null
? TextTransform.values[pigeonMap['textTransform']! as int]
: null,
iconColor: pigeonMap['iconColor'] as int?,
iconHaloBlur: pigeonMap['iconHaloBlur'] as double?,
iconHaloColor: pigeonMap['iconHaloColor'] as int?,
iconHaloWidth: pigeonMap['iconHaloWidth'] as double?,
iconOpacity: pigeonMap['iconOpacity'] as double?,
textColor: pigeonMap['textColor'] as int?,
textHaloBlur: pigeonMap['textHaloBlur'] as double?,
textHaloColor: pigeonMap['textHaloColor'] as int?,
textHaloWidth: pigeonMap['textHaloWidth'] as double?,
textOpacity: pigeonMap['textOpacity'] as double?,
);
}