setObject method
Serialises value to JSON and saves it under key.
value must be a JSON-serialisable map (e.g. from toJson()).
Implementation
Future<void> setObject(String key, Map<String, dynamic> value) async {
try {
await _store.setString(key, jsonEncode(value));
} catch (e, st) {
throw StorageException(
message: 'Failed to set Object',
key: key,
cause: e,
stackTrace: st,
);
}
}