如何解决是否可以在 Flutter Web App 中使用 Firebase RemoteConfig?
我正在尝试在我的 Flutter Web 应用程序中使用 Firebase RemoteConfig,但是当我调用方法“fetchAndActivate”时,发生了一个奇怪的错误:
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
RemoteConfig.instance.fetchAndActivate();
错误:
Error: Expected a value of type 'int',but got one of type 'Null'
at Object.throw_ [as throw] (http://localhost:53640/dart_sdk.js:5032:11)
at Object.castError (http://localhost:53640/dart_sdk.js:5005:15)
at Object.cast [as as] (http://localhost:53640/dart_sdk.js:5314:17)
at Function.as (http://localhost:53640/dart_sdk.js:17870:19)
at method_channel_firebase_remote_config.MethodChannelFirebaseRemoteConfig.new.setInitialValues (http://localhost:53640/packages/firebase_remote_config_platform_interface/src/method_channel/method_channel_firebase_remote_config.dart.lib.js:288:67)
解决方法
目前 Flutter Web 不支持远程配置。 Link。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。