```dart
void myTokenReceivedHandler(String token) {
  // Do something with the received token
}

final subscription = Amplify.Notifications.Push.onTokenReceived
  .listen(myTokenReceivedHandler);

// Remember to cancel the subscription when it is no longer needed
subscription.cancel();
```
