write method
Replaces the value stored under id.
Implementation
@override
Future<void> write(String id, String value) async {
try {
await directory.create(recursive: true);
final f = _file(id);
final tmp = File('${f.path}.tmp');
await tmp.writeAsString(value, flush: true);
await tmp.rename(f.path);
} catch (_) {
// Storage is best effort: the next verified bundle is written again.
}
}