protected static method

Future<TSharedProtectedIntPod> protected(
  1. String key, {
  2. int? initialValue,
})

Implementation

static Future<TSharedProtectedIntPod> protected(
  String key, {
  int? initialValue,
}) async {
  final instance = TSharedProtectedIntPod(
    key,
    fromValue: (rawValue) => rawValue,
    toValue: (value) => value,
    initialValue: initialValue,
  );
  await instance.refresh();
  return instance;
}