fromJson static method

LineOptions fromJson(
  1. Map map
)

Implementation

static LineOptions fromJson(Map<dynamic, dynamic> map) {
  List<LatLng> geometry =[];
  for(var item in (map['geometry'] as List<dynamic>)) {
    List<dynamic> latLng = item as List<dynamic>;
    geometry.add(LatLng(latLng.first as double, latLng.last as double));
  }
  return LineOptions(
      lineJoin: map['lineJoin'] as String?,
      lineOpacity: map['lineOpacity'] as double?,
      lineColor: map['lineColor'] as String?,
      lineWidth: map['lineWidth'] as double?,
      lineGapWidth: map['lineGapWidth'] as double?,
      lineOffset: map['lineOffset'] as double?,
      lineBlur: map['lineBlur'] as double?,
      linePattern: map['linePattern'] as String?,
      draggable: map['draggable'] as bool?,
      geometry: geometry
  );
}