protected static method

Async<TSharedProtectedDoublePod> protected(
  1. String key, {
  2. double? initialValue,
})

Implementation

static Async<TSharedProtectedDoublePod> protected(
  String key, {
  double? initialValue,
}) {
  final finalInitialValue = initialValue ?? 0.0;
  return TSharedProtectedDoublePod.create(
    key,
    fromValue: (rawValue) => rawValue ?? finalInitialValue,
    toValue: (value) => value,
    initialValue: finalInitialValue,
  );
}