Sound.fromJson constructor

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

Implementation

factory Sound.fromJson(Map<String, dynamic> json) => Sound(
      successBeepEnabled: json.containsKey("successBeepEnabled")
          ? (json["successBeepEnabled"] as bool)
          : true,
      soundType: json.containsKey("soundType")
          ? SoundType.values.byName(json["soundType"] as String)
          : SoundType.MODERN_BEEP,
    );