loadAsFile method
Loads a single fileName
to the cache but returns it as a File.
Note: this is not available for web, as File doesn't make sense on the browser!
Implementation
Future<File> loadAsFile(String fileName) async {
if (kIsWeb) {
throw 'This method cannot be used on web!';
}
final uri = await load(fileName);
return fileSystem.file(uri.toFilePath(windows: false));
}