localConfigInt function

  1. @riverpod
int localConfigInt(
  1. Ref<Object?> ref,
  2. String key, [
  3. int defaultValue = Config.defaultValueForInt
])

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

Implementation

@riverpod
int localConfigInt(Ref ref, String key,
    [int defaultValue = Config.defaultValueForInt]) {
  return ref.watch(localConfigProvider
      .select((v) => v.getInt(key, defaultValue: defaultValue)));
}