deleteState method

void deleteState(
  1. InjectedImp<T> injected
)

Implementation

void deleteState(InjectedImp<T> injected) async {
  final oldSnap = injected.snapState;
  try {
    await persistanceProvider!.delete();
  } catch (e, s) {
    injected
      .._snapState = oldSnap
      ..setToHasError(
        SnapError(
          error: e,
          stackTrace: s,
          refresher: () {},
        ),
      );
  }
}