I want to get the choice of the user like (allow/don't allow) for receving push notifications. I use Airship for Flutter version 7.1.2.
However, using the documentation and setting Airship.push.setUserNotificationsEnabled(true); allows the receiving of push notifications even if I click "don't allow". I check it with
Airship.push.isUserNotificationsEnabled.then((status) => {
debugPrint("Status: $status"),
)};
Any ideas how to get the user's choice and not the pre-defined value?
Just found a solution in another documentation
"When
setUserNotificationsEnabledenabled, it will cause the user to be prompted for the permission on platforms that support it. To get the result of the prompt, useenableUserNotifications."