localConfigBool function

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

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

Implementation

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