Skip to content

Commit

Permalink
Updated: NoOpStorage with new structure
Browse files Browse the repository at this point in the history
  • Loading branch information
we-mohd-i001 committed Jun 13, 2024
1 parent 323a366 commit 979592f
Showing 1 changed file with 37 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,71 @@ import 'base_service.dart';
/// A placeholder storage class when [LocalStorageType.none] is selected in env.dart.
class NoOpStorage implements LocalStorageService {
@override
Future<void> init() async {}
Future<void> add(String name) async {}

@override
Future<void> create({required String key, required String value}) async {}
Future<void> create({
String collectionName = '',
required String key,
required String value,
}) async {}

@override
Future<void> createMany({required Map<String, String> values}) async {}
Future<void> createMany({
String collectionName = '',
required Map<String, String> values,
}) async {}

@override
Future<String?> read({required String key}) async {
Future<String?> read({String collectionName = '', required String key}) async {
return null;
}

@override
Future<Map<String, String?>> readMany({required List<String> keys}) async {
Future<Map<String, String?>> readMany({
String collectionName = '',
required List<String> keys,
}) async {
return {};
}

@override
Future<Map<String, String?>> readAll() async {
Future<Map<String, String?>> readAll({String collectionName = ''}) async {
return {};
}

@override
Future<void> update({required String key, required String value}) async {}
Future<void> update({
String collectionName = '',
required String key,
required String value,
}) async {}

@override
Future<void> updateMany({required Map<String, String> values}) async {}
Future<void> updateMany({
String collectionName = '',
required Map<String, String> values,
}) async {}

@override
Future<void> createOrUpdate({required String key, required String value}) async {}
Future<void> createOrUpdate({
String collectionName = '',
required String key,
required String value,
}) async {}

@override
Future<void> createOrUpdateMany({required Map<String, String> values}) async {}
Future<void> createOrUpdateMany({
String collectionName = '',
required Map<String, String> values,
}) async {}

@override
Future<void> delete({required String key}) async {}
Future<void> delete({String collectionName = '', required String key}) async {}

@override
Future<void> deleteMany({List<String> keys = const []}) async {}
Future<void> deleteMany({String collectionName = '', List<String> keys = const []}) async {}

@override
Future<void> deleteAll() async {}
Future<void> deleteAll({String collectionName = ''}) async {}
}

0 comments on commit 979592f

Please sign in to comment.