readDoc function
Implementation
Future<File?> readDoc(String name, {int? cacheSize}) async {
//TODO: support reading images/file from indexedDb or something for web
final file = (await localFile(name, "jaman"));
// ignore: unused_local_variable
final err = (name == Options().no_image_placeholder_name)
? NoImagePlaceholderException()
: Exception("file $file doesnt exist");
if (!file.existsSync())
// throw err;
return null;
if (file.lengthSync() < 5) throw Exception("file $file definitely to small");
//TO-DO: was wenn keine datei da lesbar ist? -> return null
// das ist wichtig damit der placeholder statt einem "image corrupt" dargestellt wird
return await localFile(name);
}