getGCMConfig method
Implementation
@override
Future<GcmConfig?> getGCMConfig() async {
try {
debugPrint('Calling getGCMConfig method...');
final result = await methodChannel.invokeMethod<Map<dynamic, dynamic>>('getGCMConfig');
debugPrint('getGCMConfig result type: ${result?.runtimeType}');
if (result == null) {
debugPrint('getGCMConfig result is null');
return null;
}
// Convert the entire map structure
Map<String, dynamic> convertedMap = _convertMapToStringDynamic(result);
return GcmConfig.fromJson(convertedMap);
} catch (e) {
debugPrint('Error in getGCMConfig: $e');
debugPrint('Stack trace: ${StackTrace.current}');
return null;
}
}