createFromMap static method
Implementation
static NotificationSettings createFromMap(Map map) {
return NotificationSettings(
AuthorizationStatus.values[map['authorizationStatus']],
NotificationSetting.values[map['soundSetting']],
NotificationSetting.values[map['badgeSetting']],
NotificationSetting.values[map['alertSetting']],
NotificationSetting.values[map['notificationCenterSetting']],
NotificationSetting.values[map['lockScreenSetting']],
NotificationSetting.values[map['carPlaySetting']],
AlertStyle.values[map['alertStyle']],
map['showPreviewsSetting'] != null
? ShowPreviewsSetting.values[map['showPreviewsSetting']]
: ShowPreviewsSetting.whenAuthenticated,
map['criticalAlertSetting'] != null
? NotificationSetting.values[map['criticalAlertSetting']]
: NotificationSetting.notSupported,
map['providesAppNotificationSettings'] != null
? (map['providesAppNotificationSettings'] == 1)
: false,
map['announcementSetting'] != null
? NotificationSetting.values[map['announcementSetting']]
: NotificationSetting.notSupported,
);
}