media_saver

Last updated:

0 purchases

media_saver Image
media_saver Images
Add to Cart

Description:

media saver

media_saver #

Quick and Simple save media file for Android and IOS
Features #

Implements native permission (Android)
Save image to Pictures for Android and IOS
Support save jpg/png/gif image
Support set image name, set image dir, set image suffix

Installation #
Add it to your pubspec.yaml file
dependencies:
media_saver: <PLUGIN_VERSION>
copied to clipboard
Install it
pub get
copied to clipboard
Import it
import 'package:media_saver/media_saver.dart';
copied to clipboard
For iOS you need setting info.plist with
Privacy - Photo Library Additions Usage Description
copied to clipboard
Usage #



var response = await Dio().get(
'https://flutter.dev/assets/flutter-lockup-c13da9c9303e26b8d5fc208d2a1fa20c1ef47eb021ecadf27046dea04c0cebf6.png',
options: Options(responseType: ResponseType.bytes),
);

String path = await MediaSaver.saveImage(
Uint8List.fromList(response.data),
imageType: ImageType.PNG,
fileName: 'saveFileName',
directory: 'demo',
);
copied to clipboard
License #
MIT @yk3372 @wsh794972562

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.