registerForPushNotifications static method
Implementation
static Future<Map<String, dynamic>> registerForPushNotifications(
String? title, String? message) async {
final result = await methodChannel.invokeMethod('registerForPush', <String, dynamic>{
'title': title,
'message': message,
});
// Convert the result to a Map<String, dynamic>
if (result is Map) {
return Map<String, dynamic>.from(result);
}
// Return a default response if the result is not a map
return {'granted': false, 'authorizationStatus': 'unknown'};
}