SpritefusionMapLayer.fromMap constructor

SpritefusionMapLayer.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory SpritefusionMapLayer.fromMap(Map<String, dynamic> map) {
  return SpritefusionMapLayer(
    name: map['name'] as String,
    collider: map['collider'] ?? false,
    tiles: List<SpritefusionMapLayerTile>.from(
      (map['tiles'] as List).map<SpritefusionMapLayerTile>(
        (x) => SpritefusionMapLayerTile.fromMap(x as Map<String, dynamic>),
      ),
    ),
  );
}