ET
Size: a a a
ET
ET
ET
kf
I
kf
ET
V
C
ВК
V
C
C
Future<File> urlToFile(String imageUrl) async {
var rng = new Random();
Directory tempDir = await getTemporaryDirectory();
String tempPath = tempDir.path;
File file = new File('$tempPath'+ (rng.nextInt(100)).toString() +'.png');
http.Response response = await http.get(imageUrl);
await file.writeAsBytes(response.bodyBytes);
return file;
}
ВК
V
C
C