Skip to content

Commit ca89063

Browse files
committed
fix: share and download dependencies and permissions
1 parent 74609ca commit ca89063

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

lib/network/images.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ import 'package:file_picker/file_picker.dart';
77
import 'package:flutter/foundation.dart';
88
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
99
import 'package:image_gallery_saver/image_gallery_saver.dart';
10-
import 'package:image_picker/image_picker.dart';
1110
import 'package:path/path.dart' as path;
1211
import 'package:path_provider/path_provider.dart';
1312
import 'package:piwigo_ng/models/album_model.dart';
1413
import 'package:piwigo_ng/models/image_model.dart';
1514
import 'package:piwigo_ng/network/api_error.dart';
15+
import 'package:piwigo_ng/network/upload.dart';
1616
import 'package:piwigo_ng/services/chunked_uploader.dart';
1717
import 'package:piwigo_ng/services/notification_service.dart';
1818
import 'package:piwigo_ng/services/preferences_service.dart';
@@ -292,6 +292,7 @@ Future<XFile?> downloadImage(
292292
ImageModel image,
293293
) async {
294294
String localPath = path.join(dirPath, image.file);
295+
if (!await askMediaPermission()) return null;
295296
try {
296297
await ApiClient.download(
297298
path: image.elementUrl,

pubspec.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ dependencies:
4040
flutter_easyloading: ^3.0.5 # Show loading dialog
4141

4242
# Storage
43-
package_info_plus: ^3.1.2 # Get project info (version)
43+
package_info_plus: ^8.0.0 # Get project info (version)
4444
path_provider: ^2.0.11 # Get application documents
4545
shared_preferences: ^2.0.15 # Base local storage
4646
flutter_secure_storage: ^6.0.0 # Local storage secured for logins
4747
image_picker: ^0.8.5+3 # Pick images from camera
4848
file_picker: ^5.2.5 # Pick images and videos at a time for upload
4949

5050
# Device
51-
device_info_plus: ^8.2.0 # Get device info (version)
51+
device_info_plus: ^10.1.0 # Get device info (version)
5252
flutter_local_notifications: ^17.2.0 # Throws notifications on download or upload
5353
open_filex: ^4.3.2 # Open files with devices apps
5454
workmanager: ^0.5.0 # Background processes (auto upload)
@@ -57,10 +57,10 @@ dependencies:
5757
# Utils
5858
mime_type: ^1.0.0 # Check mime type of files (differentiate photos from videos)
5959
video_player: ^2.4.7 # Read video files in fullscreen mode
60-
chewie: ^1.5.0 # Video player with options
60+
chewie: ^1.8.1 # Video player with options
6161
flutter_image_compress: ^1.1.3 # Remove metadata
6262
permission_handler: ^10.2.0 # Check and asks for permissions
63-
share_plus: ^4.4.0 # Share files
63+
share_plus: ^9.0.0 # Share files
6464
flutter_cache_manager: ^3.3.0 # Handles network image cache
6565
heic_to_jpg: ^0.2.0 # Convert heic files to jpg
6666
provider: ^6.0.3 # Notifiers for theme and language changes

0 commit comments

Comments
 (0)