getPushConfigsFromCache method Null safety

Future<ChatPushConfigs?> getPushConfigsFromCache()

Implementation

Future<ChatPushConfigs?> getPushConfigsFromCache() async {
  Map result = await _channel.invokeMethod(ChatMethodKeys.getImPushConfig);
  try {
    ChatError.hasErrorFromResult(result);
    return ChatPushConfigs.fromJson(result[ChatMethodKeys.getImPushConfig]);
  } on ChatError catch (e) {
    throw e;
  }
}