image from internet flutter
Image.network(
'https://picsum.photos/250?image=9',
)
image from internet flutter
Image.network(
'https://picsum.photos/250?image=9',
)
flutter image downloader
$ flutter pub add image_downloader
dependencies:
image_downloader: ^0.31.0
import 'package:image_downloader/image_downloader.dart';
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
try {
// Saved with this method.
var imageId = await ImageDownloader.downloadImage("https://raw.githubusercontent.com/wiki/ko2ic/image_downloader/images/flutter.png");
if (imageId == null) {
return;
}
// Below is a method of obtaining saved image information.
var fileName = await ImageDownloader.findName(imageId);
var path = await ImageDownloader.findPath(imageId);
var size = await ImageDownloader.findByteSize(imageId);
var mimeType = await ImageDownloader.findMimeType(imageId);
} on PlatformException catch (error) {
print(error);
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us