File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import 'package:extended_text/extended_text.dart';
66import 'package:file_picker/file_picker.dart' ;
77import 'package:flutter/foundation.dart' ;
88import 'package:flutter_local_notifications/flutter_local_notifications.dart' ;
9+ import 'package:image_gallery_saver/image_gallery_saver.dart' ;
910import 'package:image_picker/image_picker.dart' ;
1011import 'package:path/path.dart' as path;
1112import 'package:path_provider/path_provider.dart' ;
@@ -257,6 +258,10 @@ Future<XFile?> downloadImage(
257258 path: image.elementUrl,
258259 outputPath: localPath,
259260 );
261+ await ImageGallerySaver .saveFile (
262+ localPath,
263+ name: image.name,
264+ );
260265 return XFile (localPath);
261266 } on DioError catch (e) {
262267 debugPrint ("Download images: ${e .message }" );
Original file line number Diff line number Diff line change @@ -40,7 +40,6 @@ dependencies:
4040 path_provider : ^2.0.11 # Get application documents
4141 shared_preferences : ^2.0.15 # Base local storage
4242 flutter_secure_storage : ^6.0.0 # Local storage secured for logins
43- provider : ^6.0.3 # Notifiers for theme and language changes
4443 image_picker : ^0.8.5+3 # Pick images from camera
4544 file_picker : ^5.2.5 # Pick images and videos at a time for upload
4645
@@ -49,6 +48,7 @@ dependencies:
4948 flutter_local_notifications : ^12.0.2 # Throws notifications on download or upload
5049 open_filex : ^4.3.2 # Open files with devices apps
5150 workmanager : ^0.5.0 # Background processes (auto upload)
51+ image_gallery_saver : ^2.0.3 # Download images
5252
5353 # Utils
5454 mime_type : ^1.0.0 # Check mime type of files (differentiate photos from videos)
@@ -59,6 +59,7 @@ dependencies:
5959 share_plus : ^4.4.0 # Share files
6060 flutter_cache_manager : ^3.3.0 # Handles network image cache
6161 heic_to_jpg : ^0.2.0 # Convert heic files to jpg
62+ provider : ^6.0.3 # Notifiers for theme and language changes
6263
6364 # Translations
6465 flutter_localizations :
You can’t perform that action at this time.
0 commit comments