CSSLayerData.fromJson constructor

CSSLayerData.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory CSSLayerData.fromJson(Map<String, dynamic> json) {
  return CSSLayerData(
    name: json['name'] as String,
    subLayers: json.containsKey('subLayers')
        ? (json['subLayers'] as List)
            .map((e) => CSSLayerData.fromJson(e as Map<String, dynamic>))
            .toList()
        : null,
    order: json['order'] as num,
  );
}