From 979592f65d5dc248bdbf8ebf4ea11cdda0a04a67 Mon Sep 17 00:00:00 2001 From: Mohd Imran Date: Thu, 13 Jun 2024 17:51:16 +0530 Subject: [PATCH] Updated: NoOpStorage with new structure --- .../storage/local/services/no_op_storage.dart | 50 ++++++++++++++----- 1 file changed, 37 insertions(+), 13 deletions(-) diff --git a/lib/vaahextendflutter/services/storage/local/services/no_op_storage.dart b/lib/vaahextendflutter/services/storage/local/services/no_op_storage.dart index 329f159..bc28c95 100644 --- a/lib/vaahextendflutter/services/storage/local/services/no_op_storage.dart +++ b/lib/vaahextendflutter/services/storage/local/services/no_op_storage.dart @@ -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 init() async {} + Future add(String name) async {} @override - Future create({required String key, required String value}) async {} + Future create({ + String collectionName = '', + required String key, + required String value, + }) async {} @override - Future createMany({required Map values}) async {} + Future createMany({ + String collectionName = '', + required Map values, + }) async {} @override - Future read({required String key}) async { + Future read({String collectionName = '', required String key}) async { return null; } @override - Future> readMany({required List keys}) async { + Future> readMany({ + String collectionName = '', + required List keys, + }) async { return {}; } @override - Future> readAll() async { + Future> readAll({String collectionName = ''}) async { return {}; } @override - Future update({required String key, required String value}) async {} + Future update({ + String collectionName = '', + required String key, + required String value, + }) async {} @override - Future updateMany({required Map values}) async {} + Future updateMany({ + String collectionName = '', + required Map values, + }) async {} @override - Future createOrUpdate({required String key, required String value}) async {} + Future createOrUpdate({ + String collectionName = '', + required String key, + required String value, + }) async {} @override - Future createOrUpdateMany({required Map values}) async {} + Future createOrUpdateMany({ + String collectionName = '', + required Map values, + }) async {} @override - Future delete({required String key}) async {} + Future delete({String collectionName = '', required String key}) async {} @override - Future deleteMany({List keys = const []}) async {} + Future deleteMany({String collectionName = '', List keys = const []}) async {} @override - Future deleteAll() async {} + Future deleteAll({String collectionName = ''}) async {} }