-
Hi, Does it support by moor? or where can modify to get it work with in-memory instead of LocalStorage. Thank you. |
Beta Was this translation helpful? Give feedback.
Answered by
simolus3
Mar 9, 2021
Replies: 1 comment 1 reply
-
That's an interesting question! You could write a custom class InMemoryWebStorage implements MoorWebStorage {
Uint8List? _storedData;
@override
Future<void> close() => Future.value();
@override
Future<void> open() => Future.value();
@override
Future<Uint8List?> restore() => Future.value(_storedData);
@override
Future<void> store(Uint8List data) {
_storedData = data;
return Future.value();
}
} You could then use a |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
thachnb85
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That's an interesting question! You could write a custom
MoorWebStorage
that just stores data in memory:You could then use a
WebDatabase.withStorage(InMemoryWebStorage())
.