remoteConfigBool function

  1. @riverpod
bool remoteConfigBool(
  1. Ref<Object?> ref,
  2. String key, [
  3. bool defaultValue = Config.defaultValueForBool
])

Gets a RemoteConfig value as a bool. Whenever this key changes, this provider will be updated.

Implementation

@riverpod
bool remoteConfigBool(Ref ref, String key,
    [bool defaultValue = Config.defaultValueForBool]) {
  return ref.watch(remoteConfigProvider
      .select((v) => v.getBool(key, defaultValue: defaultValue)));
}