AndroidSettings.fromJson constructor

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

Implementation

AndroidSettings.fromJson(Map<String, dynamic> json)
  : channelId = json['channelId'],
    channelName = json['channelName'],
    badge = json['badge'],
    channelDescription = json['channelDescription'],
    lights = json['lights'],
    lightColor = json['lightColor'] == null
        ? null
        : Color.fromARGB(
            json['lightColor']['alpha'],
            json['lightColor']['red'],
            json['lightColor']['green'],
            json['lightColor']['blue'],
          ),
    playSound = json['playSound'],
    importance = AndroidImportance.values.asNameMap()[json['importance']],
    visibility = AndroidVisibility.values.asNameMap()[json['visibility']],
    vibrate = json['vibrate'],
    vibrationPattern = json['vibrationPattern'] == null
        ? null
        : Int64List.fromList(List<int>.from((json['vibrationPattern']))),
    registerBackgroundHandler = json['registerBackgroundHandler'];