我有Flutter应用,并且正在使用远程配置来检索一些信息,
我要使用firebase_remote_config 0.2.0 + 5插件
versionCheck(context) async {
final RemoteConfig remoteConfig = await RemoteConfig.instance;
try {
// Using default duration to force fetching from remote server.
await remoteConfig.fetch(expiration: const Duration(seconds: 0));
await remoteConfig.activateFetched();
remoteConfig.getString('force_update_current_version');
print(remoteConfig.getString('force_update_current_version'));
} on FetchThrottledException catch (exception) {
// Fetch throttled.
print(exception);
} catch (exception) {
print('Unable to fetch remote config. Cached or default values will be '
'used');
}
每次出现错误时,都未设置应用程序名称。调用Builder#setApplicationName,并显示我的异常消息。