write method
Writes value to storage for the given key
Implementation
@override
Future<void> write(String key, dynamic value) async {
return _lock.synchronized(() async {
try {
await box.put(key, value);
} catch (error, stackTrace) {
throw StorageException('Failed to write key: $key', error, stackTrace);
}
});
}