D/image_downloader(21091): 0
D/image_downloader(21091): RequestResult(id=798, remoteUri=http://192.168.43.159/flutter-news/images/berita/92dae9b51087d930a32aff53eaded163.jpg, localUri=null, mediaType=null, totalSize=-1, title=, description=)
D/image_downloader(21091): 0
D/image_downloader(21091): RequestResult(id=798, remoteUri=http://192.168.43.159/flutter-news/images/berita/92dae9b51087d930a32aff53eaded163.jpg, localUri=null, mediaType=null, totalSize=-1, title=, description=)
D/image_downloader(21091): 0
D/image_downloader(21091): RequestResult(id=798, remoteUri=http://192.168.43.159/flutter-news/images/berita/92dae9b51087d930a32aff53eaded163.jpg, localUri=null, mediaType=null, totalSize=-1, title=, description=)
D/image_downloader(21091): 0
D/image_downloader(21091): RequestResult(id=798, remoteUri=http://192.168.43.159/flutter-news/images/berita/92dae9b51087d930a32aff53eaded163.jpg, localUri=null, mediaType=null, totalSize=-1, title=, description=)
D/image_downloader(21091): 0
D/image_downloader(21091): RequestResult(id=798, remoteUri=http://192.168.43.159/flutter-news/images/berita/92dae9b51087d930a32aff53eaded163.jpg, localUri=null, mediaType=null, totalSize=-1, title=, description=)
D/image_downloader(21091): 0
D/image_downloader(21091): RequestResult(id=798, remoteUri=http://192.168.43.159/flutter-news/images/berita/92dae9b51087d930a32aff53eaded163.jpg, localUri=null, mediaType=null, totalSize=-1, title=, description=)
D/image_downloader(21091): 0
D/image_downloader(21091): RequestResult(id=798, remoteUri=http://192.168.43.159/flutter-news/images/berita/92dae9b51087d930a32aff53eaded163.jpg, localUri=null, mediaType=null, totalSize=-1, title=, description=)
D/image_downloader(21091): 0
D/image_downloader(21091): RequestResult(id=798, remoteUri=http://192.168.43.159/flutter-news/images/berita/92dae9b51087d930a32aff53eaded163.jpg, localUri=null, mediaType=null, totalSize=-1, title=, description=)
D/image_downloader(21091): 0
D/image_downloader(21091): RequestResult(id=798, remoteUri=http://192.168.43.159/flutter-news/images/berita/92dae9b51087d930a32aff53eaded163.jpg, localUri=null, mediaType=null, totalSize=-1, title=, description=)
D/image_downloader(21091): 0
D/image_downloader(21091): RequestResult(id=798, remoteUri=http://192.168.43.159/flutter-news/images/berita/92dae9b51087d930a32aff53eaded163.jpg, localUri=null, mediaType=null, totalSize=-1, title=, description=)
D/image_downloader(21091): 0
Application finished.
Exited (sigterm)
Future testingDownloadImage(String imageUrl) async {
try {
var imageId =
await ImageDownloader.downloadImage('$baseURLimage/berita/$imageUrl');
if (imageId == null) {
print('Image Kosong');
}
var fileName = await ImageDownloader.findName(imageId);
var path = await ImageDownloader.findPath(imageId);
var size = await ImageDownloader.findByteSize(imageId);
var mimeType = await ImageDownloader.findMimeType(imageId);
print(imageId);
print(fileName);
print(path);
print(size);
print(mimeType);
} catch (e) {
print(e);
return null;
}
}
void _testingDownloadImage(String imageUrl) async {
var downloadImage = api.testingDownloadImage(imageUrl);
print(downloadImage);
if (downloadImage != null) {
print('success');
} else {
print('failed');
}
}
IconButton(
onPressed: () => _testingDownloadImage(
widget.gambarBerita),
icon: Icon(Icons.save),
),