requestNotificationAuthorization method
void
requestNotificationAuthorization()
Call this method to trigger the iOS/Android 13 popup that asks the user if they want to allow notifications to be displayed. You should call this at a strategic moment, like at the end of your onboarding.
iOS specific: You will then be able to get a push token: Batch will automatically ask for a push token if the user replies positively. The default registration is made with Badge, Sound and Alert.
Implementation
void requestNotificationAuthorization() {
_channel.invokeMethod('push.requestPermission');
}