NotificationSettings.fromMap constructor

NotificationSettings.fromMap(
  1. Map map
)

Implementation

factory NotificationSettings.fromMap(Map<dynamic, dynamic> map) {
  AndroidNotificationSettings? androidNotificationSettings;
  IOSNotificationSettings? iosNotificationSettings;
  try {
    androidNotificationSettings =
        AndroidNotificationSettings.fromMap(map['android']);
  } catch (e) {
    androidNotificationSettings = null;
  }
  try {
    iosNotificationSettings = IOSNotificationSettings.fromMap(map['iOS']);
  } catch (e) {
    iosNotificationSettings = null;
  }
  return NotificationSettings(
    android: androidNotificationSettings,
    iOS: iosNotificationSettings,
  );
}