简体   繁体   中英

Is it possible to use Firebase RemoteConfig in Flutter Web App?

I'm trying to use Firebase RemoteConfig in my Flutter Web App, but when I call the method "fetchAndActivate", a strange error occurs:

WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
RemoteConfig.instance.fetchAndActivate();

Error:

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)

文档说它现在支持 (2021) https://firebase.flutter.dev/升级到 firebase_remote_config 后我可以在 web 应用程序中使用它:^1.0.2

At this time, Remote config is not supported on Flutter Web. Link .

看

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM