AndroidNotification.fromJson constructor

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

Implementation

factory AndroidNotification.fromJson(Map<String, dynamic> json) =>
    AndroidNotification(
      sound: json["sound"],
      clickAction: json["click_action"],
      color: json["color"],
      tag: json["tag"],
      bodyLocKey: json["body_loc_key"],
      bodyLocArgs: json["body_loc_args"] == null
          ? []
          : List<String>.from(json["body_loc_args"]!.map((x) => x)),
      titleLocKey: json["title_loc_key"],
      titleLocArgs: json["title_loc_args"] == null
          ? []
          : List<String>.from(json["title_loc_args"]!.map((x) => x)),
      channelId: json["channel_id"],
      sticky: json["sticky"],
      eventTime: json["event_time"] == null
          ? null
          : DateTime.parse(json["event_time"]),
      localOnly: json["local_only"],
      defaultSound: json["default_sound"],
      defaultVibrateTimings: json["default_vibrate_timings"],
      defaultLightSettings: json["default_light_settings"],
      vibrateTimings: json["vibrate_timings"] == null
          ? []
          : List<String>.from(json["vibrate_timings"]!.map((x) => x)),
      visibility: json["visibility"],
      notificationPriority: json["notification_priority"],
      notificationCount: json["notification_count"],
      lightSettings: json["light_settings"] == null
          ? null
          : LightSettings.fromJson(json["light_settings"]),
    );