Search code examples
firebaseflutterdartpubspec

Firebase Remote Config: The named parameter 'expiration' isn't defined


The parameter 'expiration' is not defined I updated firebase remote config to 0.10.0 and I got this error in this line.

await _remoteConfig.fetch(expiration: Duration(hours: 5));

Solution

  • The package is updated please try this.

     await remoteConfig.setConfigSettings(RemoteConfigSettings(
                  fetchTimeout: const Duration(seconds: 10),
                  minimumFetchInterval: Duration.zero,
                ));
                await remoteConfig.fetchAndActivate();