Firebase Remote Config Empty Values

125 Views Asked by At

I'm having some issues with my firebase remote config implementation. All the values are fetched and activated properly the first time the app is launched, however if the app is removed from background and opened again, the map from remote config is an empty map. I don't know where the configuration may be failing, but this is my implementation

main.dart

WidgetsFlutterBinding.ensureInitialized();
  await setDeviceOrientation();
  await Firebase.initializeApp();
  await initFirebaseServices();
  await initLocalStorage();
  FirebaseBlocCubit firebaseBlocCubit = FirebaseBlocCubit();
  print(remoteConfig.getAll());
  await firebaseBlocCubit.initializate();
Future<void> initFirebaseServices() async {
  remoteConfig = FirebaseRemoteConfig.instance;
  await remoteConfig.ensureInitialized();
  await remoteConfig.setConfigSettings(
    RemoteConfigSettings(
      fetchTimeout: const Duration(seconds: 10),
      minimumFetchInterval: Duration.zero,
    ),
  );
  await remoteConfig.fetchAndActivate();
}

I tried implementing again Firebase, and I expect that after every initialization of the app the variables are fetched correctly

Thanks for any help

0

There are 0 best solutions below