Skip to content

Commit d5840c0

Browse files
authored
refactor(ui): replace image_gallery_save_plus with gal (#2112)
1 parent c914e71 commit d5840c0

File tree

11 files changed

+20
-10
lines changed

11 files changed

+20
-10
lines changed

melos.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ command:
4949
flutter_slidable: ^3.1.1
5050
flutter_svg: ^2.0.10+1
5151
freezed_annotation: ^2.4.1
52+
gal: ^2.3.1
5253
get_thumbnail_video: ^0.7.3
5354
go_router: ^14.6.2
5455
http_parser: ^4.0.2
55-
image_gallery_saver_plus: ^3.0.5
5656
image_picker: ^1.1.2
5757
image_size_getter: ^2.3.0
5858
jiffy: ^6.2.1

packages/stream_chat_flutter/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
🔄 Changed
44

55
- Updated minimum Flutter version to 3.27.4 for the SDK.
6+
- Replaced [image_gallery_saver_plus](https://pub.dev/packages/image_gallery_saver_plus) with [gal](https://pub.dev/packages/gal)
67

78
## 9.3.0
89

packages/stream_chat_flutter/example/windows/flutter/generated_plugins.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
66
connectivity_plus
77
desktop_drop
88
file_selector_windows
9+
gal
910
media_kit_video
1011
record_windows
1112
screen_brightness_windows

packages/stream_chat_flutter/lib/src/attachment/handler/stream_attachment_handler_io.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import 'dart:io';
22

33
import 'package:file_picker/file_picker.dart';
44
import 'package:file_selector/file_selector.dart';
5-
import 'package:image_gallery_saver_plus/image_gallery_saver_plus.dart';
5+
import 'package:gal/gal.dart';
66
import 'package:image_picker/image_picker.dart';
77
import 'package:path_provider/path_provider.dart';
88
import 'package:stream_chat_flutter/src/attachment/handler/common.dart';
@@ -196,7 +196,7 @@ class StreamAttachmentHandler extends StreamAttachmentHandlerBase {
196196

197197
// Now that the file is saved, we need to copy it to the user's gallery
198198
// because the gallery only shows files that are in the gallery folder.
199-
await ImageGallerySaverPlus.saveFile(path);
199+
await Gal.putImage(path);
200200

201201
// Once the file is copied to the gallery, we can delete the temporary file.
202202
await file.delete();

packages/stream_chat_flutter/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ dependencies:
3737
flutter_markdown: ^0.7.2+1
3838
flutter_portal: ^1.1.4
3939
flutter_svg: ^2.0.10+1
40+
gal: ^2.3.1
4041
get_thumbnail_video: ^0.7.3
4142
http_parser: ^4.0.2
42-
image_gallery_saver_plus: ^3.0.5
4343
image_picker: ^1.1.2
4444
image_size_getter: ^2.3.0
4545
jiffy: ^6.2.1

sample_app/android/app/build.gradle

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ android {
2828

2929
compileSdkVersion 35
3030

31+
ndkVersion "26.2.11394342"
32+
3133
sourceSets {
3234
main.java.srcDirs += 'src/main/kotlin'
3335
}

sample_app/ios/Runner.xcodeproj/project.pbxproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,8 @@
266266
"${BUILT_PRODUCTS_DIR}/flutter_app_badger/flutter_app_badger.framework",
267267
"${BUILT_PRODUCTS_DIR}/flutter_local_notifications/flutter_local_notifications.framework",
268268
"${BUILT_PRODUCTS_DIR}/flutter_secure_storage/flutter_secure_storage.framework",
269+
"${BUILT_PRODUCTS_DIR}/gal/gal.framework",
269270
"${BUILT_PRODUCTS_DIR}/get_thumbnail_video/get_thumbnail_video.framework",
270-
"${BUILT_PRODUCTS_DIR}/image_gallery_saver_plus/image_gallery_saver_plus.framework",
271271
"${BUILT_PRODUCTS_DIR}/image_picker_ios/image_picker_ios.framework",
272272
"${BUILT_PRODUCTS_DIR}/just_audio/just_audio.framework",
273273
"${BUILT_PRODUCTS_DIR}/libwebp/libwebp.framework",
@@ -310,8 +310,8 @@
310310
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_app_badger.framework",
311311
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_local_notifications.framework",
312312
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_secure_storage.framework",
313+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/gal.framework",
313314
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/get_thumbnail_video.framework",
314-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_gallery_saver_plus.framework",
315315
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_picker_ios.framework",
316316
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/just_audio.framework",
317317
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libwebp.framework",

sample_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
ignoresPersistentStateOnLaunch = "NO"
4949
debugDocumentVersioning = "YES"
5050
debugServiceExtension = "internal"
51+
enableGPUValidationMode = "1"
5152
allowLocationSimulation = "YES">
5253
<BuildableProductRunnable
5354
runnableDebuggingMode = "0">

sample_app/macos/Podfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
platform :osx, '10.15'
1+
# Uncomment this line to define a global platform for your project
2+
# platform :osx, '11.5'
23

34
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
45
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

sample_app/macos/Runner.xcodeproj/project.pbxproj

+6-3
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@
427427
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
428428
GCC_WARN_UNUSED_FUNCTION = YES;
429429
GCC_WARN_UNUSED_VARIABLE = YES;
430-
MACOSX_DEPLOYMENT_TARGET = 10.15;
430+
MACOSX_DEPLOYMENT_TARGET = 11.5;
431431
MTL_ENABLE_DEBUG_INFO = NO;
432432
SDKROOT = macosx;
433433
SWIFT_COMPILATION_MODE = wholemodule;
@@ -450,6 +450,7 @@
450450
"$(inherited)",
451451
"@executable_path/../Frameworks",
452452
);
453+
MACOSX_DEPLOYMENT_TARGET = 11.5;
453454
PROVISIONING_PROFILE_SPECIFIER = "";
454455
SWIFT_VERSION = 5.0;
455456
};
@@ -507,7 +508,7 @@
507508
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
508509
GCC_WARN_UNUSED_FUNCTION = YES;
509510
GCC_WARN_UNUSED_VARIABLE = YES;
510-
MACOSX_DEPLOYMENT_TARGET = 10.15;
511+
MACOSX_DEPLOYMENT_TARGET = 11.5;
511512
MTL_ENABLE_DEBUG_INFO = YES;
512513
ONLY_ACTIVE_ARCH = YES;
513514
SDKROOT = macosx;
@@ -554,7 +555,7 @@
554555
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
555556
GCC_WARN_UNUSED_FUNCTION = YES;
556557
GCC_WARN_UNUSED_VARIABLE = YES;
557-
MACOSX_DEPLOYMENT_TARGET = 10.15;
558+
MACOSX_DEPLOYMENT_TARGET = 11.5;
558559
MTL_ENABLE_DEBUG_INFO = NO;
559560
SDKROOT = macosx;
560561
SWIFT_COMPILATION_MODE = wholemodule;
@@ -578,6 +579,7 @@
578579
"$(inherited)",
579580
"@executable_path/../Frameworks",
580581
);
582+
MACOSX_DEPLOYMENT_TARGET = 11.5;
581583
PROVISIONING_PROFILE_SPECIFIER = "";
582584
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
583585
SWIFT_VERSION = 5.0;
@@ -600,6 +602,7 @@
600602
"$(inherited)",
601603
"@executable_path/../Frameworks",
602604
);
605+
MACOSX_DEPLOYMENT_TARGET = 11.5;
603606
PROVISIONING_PROFILE_SPECIFIER = "";
604607
SWIFT_VERSION = 5.0;
605608
};

sample_app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
ignoresPersistentStateOnLaunch = "NO"
4949
debugDocumentVersioning = "YES"
5050
debugServiceExtension = "internal"
51+
enableGPUValidationMode = "1"
5152
allowLocationSimulation = "YES">
5253
<BuildableProductRunnable
5354
runnableDebuggingMode = "0">

0 commit comments

Comments
 (0)