getFileSize static method
Get current file size. Returns 0 if file doesn't exist.
Implementation
static Future<int> getFileSize(String url) async {
final path = await getFilePath(url);
final file = File(path);
if (!file.existsSync()) return 0;
return file.lengthSync();
}