fromJson static method
Implementation
static PushNotificationStatus fromJson(dynamic json) {
var isUserNotificationsEnabled =
json["isUserNotificationsEnabled"] ?? false;
var areNotificationsAllowed = json["areNotificationsAllowed"] ?? false;
var isPushPrivacyFeatureEnabled =
json["isPushPrivacyFeatureEnabled"] ?? false;
var isPushTokenRegistered = json["isPushTokenRegistered"] ?? false;
var isOptedIn = json["isOptedIn"] ?? false;
var isUserOptedIn = json["isUserOptedIn"] ?? false;
var notificationPermissionStatus =
json["notificationPermissionStatus"] is PermissionStatus
? json["notificationPermissionStatus"] as PermissionStatus
: PermissionStatus.notDetermined;
return PushNotificationStatus._internal(
isUserNotificationsEnabled,
areNotificationsAllowed,
isPushPrivacyFeatureEnabled,
isPushTokenRegistered,
isOptedIn,
isUserOptedIn,
notificationPermissionStatus);
}