enablePush

Enables push notifications for the device.

Syntax 

1Future<void> enablePush()

Returns 

  • Future<void> - Completes when push notifications have been enabled.

Example 

1try {
2  await SfmcSdk.enablePush();
3  print('Push notifications enabled successfully');
4} catch (e) {
5  print('Failed to enable push notifications: $e');
6}

Related Methods