isPushEnabled

Checks if push notifications are enabled for the device.

Syntax

Future<bool?> isPushEnabled()

Returns

  • Future<bool?> - Returns true if push notifications are enabled, false if disabled, or null if the status cannot be determined.

Example

bool? isEnabled = await SfmcSdk.isPushEnabled();
if (isEnabled == true) {
  print('Push notifications are enabled');
} else if (isEnabled == false) {
  print('Push notifications are disabled');
} else {
  print('Push notification status unknown');
}

Related Methods