RU | EN
image_gallery_saver_plus_aurora
Original Readme.
Description
The Aurora implementation of image_gallery_saver_plus.
This plugin allows you to download and save images and videos directly to the device gallery from your Flutter app. It features enhanced performance, improved media organization options, and broad compatibility with various devices and platforms.
Ideal for mobile and IoT applications on Aurora OS that require saving media files from the app to the user’s gallery, both online and offline.
Quickstart: Basic Usage Example
// Save a widget as an image to the gallery
_saveLocalImage() async {
RenderRepaintBoundary boundary =
_globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary;
ui.Image image = await boundary.toImage();
ByteData? byteData =
await (image.toByteData(format: ui.ImageByteFormat.png));
if (byteData != null) {
final result =
await ImageGallerySaverPlus.saveImage(byteData.buffer.asUint8List());
print(result);
}
}
// Save an image from the Internet
_saveNetworkImage() async {
var response = await Dio().get(
"https://your-image-url.jpg",
options: Options(responseType: ResponseType.bytes));
final result = await ImageGallerySaverPlus.saveImage(
Uint8List.fromList(response.data),
quality: 60,
name: "hello");
print(result);
}
// Save a file (GIF/video) from the Internet
_saveNetworkGifFile() async {
var appDocDir = await getTemporaryDirectory();
String savePath = appDocDir.path + "/temp.gif";
String fileUrl = "https://your-gif-url.gif";
await Dio().download(fileUrl, savePath);
final result =
await ImageGallerySaverPlus.saveFile(savePath, isReturnPathOfIOS: true);
print(result);
}
Features
- Save images and videos to the device gallery from Flutter applications.
- Works with both local (in-app generated) and remote (downloaded) files.
- Enhanced performance and improved media organization capabilities.
- Easy API for saving various media types (images, GIFs, videos).
- Supports offline and online scenarios for saving media files.
Contents
Installation and build
pubspec.yaml
dependencies:
image_gallery_saver_plus: ^4.0.0
image_gallery_saver_plus_aurora:
git:
url: https://developer.auroraos.ru/git/flutter/flutter-community-plugins/image_gallery_saver_plus_aurora.git
Compatibility
The application has been working correctly since the 5.0.0 version of the Aurora OS.
Terms of Use and Participation
The source code of the project is provided under the license, that allows it to be used in third-party applications.
To participate in the development of the project, please read the contributor agreement. If you plan to contribute your own source code to the project, you will need to accept the CLA agreement.
For information about contributors see AUTHORS.
Code of conduct is a current set of rules of the Open Mobile Platform which informs you how we expect the members of the community will interact while contributing and communicating.