Sound.fromJson constructor

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

Implementation

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