getLocalFileAndroid static method

Future<File> getLocalFileAndroid(
  1. String url
)

Retrieves a local file reference for Android, based on a given URL. The file is expected to be in the application's document directory.

Implementation

static Future<File> getLocalFileAndroid(String url) async {
  final directory = await getApplicationCacheDirectory();
  final filename = url.split('/').last;
  return File('${directory.path}/UpdateCenter/$filename');
}