clear method

  1. @override
Future<Response<T>> clear()
override

Implementation

@override
Future<Response<T>> clear() async {
  final response = Response<T>();
  try {
    final isSaved = await db.remove(path);
    return response.copy(data: null, isSuccessful: isSaved);
  } catch (_) {
    return response.copy(error: "Failed to clean data!");
  }
}