You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix registration lifecycle for delayed registration scenarios and
simplify API by using getter pattern for device token access.
- Add permission checking without prompting for consistent registration
- Change initialize() and registerDevice() to return Future<void>
- Use PntaFlutter.deviceToken getter to access token
- Remove metadata parameter from registerDevice()
- Update documentation and examples
For delayed registration scenarios. Requests notification permission and registers device. Must be called after `initialize()` with `registerDevice: false`.
247
+
For delayed registration scenarios. Requests notification permission and registers device using metadata from `initialize()`. Must be called after `initialize()` with `registerDevice: false`.
249
248
250
-
-`metadata`: Optional device metadata to include during registration
251
-
252
-
Returns `Future<String?>` - the device token if permission was granted and device registered successfully, null otherwise. **Note: You can ignore the return value if you don't need the token.**
249
+
Returns `Future<void>`. Use `PntaFlutter.deviceToken` getter to access the device token after successful registration.
0 commit comments