clear method

Future<void> clear()

Implementation

Future<void> clear() async {
  try {
    emit(state.copy(isLoading: true));
    await handler.clear();
    emit(state.copy(result: [], isLoading: false));
  } catch (_) {
    emit(state.copy(error: "Something went wrong!"));
    rethrow;
  }
}