protected static method
Implementation
static Async<TSharedProtectedBoolPod> protected(
String key, {
bool? initialValue,
}) {
// Provide a non-nullable default for the required `initialValue`.
final finalInitialValue = initialValue ?? false;
return TSharedProtectedBoolPod.create(
key,
// If storage is null, return the default value.
fromValue: (rawValue) => rawValue ?? finalInitialValue,
toValue: (value) => value,
initialValue: finalInitialValue,
);
}