Layer.fromJson constructor

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

Implementation

factory Layer.fromJson(Map<String, dynamic> json) {
  final layer = _$LayerFromJson(json);
  // Десериализация анимаций
  if (json['animations'] != null) {
    layer.animations = (json['animations'] as List)
        .map((e) => AnimationSerializer.fromJson(e as Map<String, dynamic>))
        .toList();
  }
  return layer;
}