getPushConfigsFromCache method Null safety

Future<EMPushConfigs?> getPushConfigsFromCache()

Implementation

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