optional<T, ARG> static method

OptionalOutput<T, ARG> optional<T, ARG>({
  1. T? seedValue,
  2. required String semantics,
  3. bool sync = true,
  4. bool printLog = true,
  5. bool isBehavior = true,
  6. required FetchCallback<T, ARG?> fetch,
  7. T? onReset()?,
  8. PersistConfig<T?>? persistConfig,
  9. bool skipError = false,
})

Implementation

static OptionalOutput<T, ARG> optional<T, ARG>({
  T? seedValue,
  required String semantics,
  bool sync = true,
  bool printLog = true,
  bool isBehavior = true,
  required FetchCallback<T, ARG?> fetch,
  T? Function()? onReset,
  PersistConfig<T?>? persistConfig,
  bool skipError = false,
}) {
  return OptionalOutput<T, ARG>(
    semantics: semantics,
    seedValue: seedValue,
    sync: sync,
    isBehavior: isBehavior,
    printLog: printLog,
    fetch: fetch,
    onReset: onReset,
    persistConfig: persistConfig,
    skipError: skipError,
  );
}