flush method
Implementation
Future<void> flush() async {
try {
final File? file = await _file();
if (file == null) return;
final Map<String, Object?> payload = _entries.map((String key, UDocProgress value) => MapEntry<String, Object?>(key, value.toJson()));
await file.writeAsString(jsonEncode(payload), flush: true);
} on Object {
return;
}
}