Skip to content

Commit

Permalink
🚀 upgrade to flutter 3.16 (#33)
Browse files Browse the repository at this point in the history
* ⬆️ upgrade to flutter 3.16

* 💄 keep example's camera buttons square

* 🎨 add assets functions params name

* 🔥 remove example test
  • Loading branch information
LeGoffMael authored Nov 22, 2023
1 parent c473da9 commit c75155d
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 37 deletions.
1 change: 1 addition & 0 deletions example/lib/pages/camera/camera_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ class _CameraPickerState extends State<CameraPicker> {
return ElevatedButton(
onPressed: () => _pickFromCamera(context),
style: ElevatedButton.styleFrom(
shape: const RoundedRectangleBorder(),
foregroundColor: Colors.white,
backgroundColor: Colors.transparent,
),
Expand Down
1 change: 1 addition & 0 deletions example/lib/pages/camera/wechat_camera_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class WeChatCameraPicker extends StatelessWidget with InstaPickerInterface {
}
},
style: ElevatedButton.styleFrom(
shape: const RoundedRectangleBorder(),
foregroundColor: Colors.white,
backgroundColor: Colors.transparent,
),
Expand Down
50 changes: 29 additions & 21 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev"
source: hosted
version: "1.17.2"
version: "1.18.0"
cross_file:
dependency: transitive
description:
Expand Down Expand Up @@ -235,7 +235,7 @@ packages:
path: ".."
relative: true
source: path
version: "2.2.0"
version: "2.3.0-dev.1"
intl:
dependency: transitive
description:
Expand Down Expand Up @@ -280,10 +280,10 @@ packages:
dependency: transitive
description:
name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.10.0"
nested:
dependency: transitive
description:
Expand Down Expand Up @@ -352,10 +352,18 @@ packages:
dependency: transitive
description:
name: photo_manager
sha256: b2d81bd197323697d1b335e2e04cea2f67e11624ced77cfd02917a10afaeba73
sha256: "8aca19e47804e99abec5dff8ea59c684181fb2b6ebbcdd3557a2b4fb8d5deae6"
url: "https://pub.dev"
source: hosted
version: "2.7.1"
version: "3.0.0-dev.2"
photo_manager_image_provider:
dependency: transitive
description:
name: photo_manager_image_provider
sha256: c187f60c3fdbe5630735d9a0bccbb071397ec03dcb1ba6085c29c8adece798a0
url: "https://pub.dev"
source: hosted
version: "2.1.0"
platform:
dependency: transitive
description:
Expand Down Expand Up @@ -429,18 +437,18 @@ packages:
dependency: transitive
description:
name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.11.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.2"
stream_transform:
dependency: transitive
description:
Expand Down Expand Up @@ -469,10 +477,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev"
source: hosted
version: "0.6.0"
version: "0.6.1"
typed_data:
dependency: transitive
description:
Expand Down Expand Up @@ -533,26 +541,26 @@ packages:
dependency: transitive
description:
name: web
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
url: "https://pub.dev"
source: hosted
version: "0.1.4-beta"
version: "0.3.0"
wechat_assets_picker:
dependency: transitive
description:
name: wechat_assets_picker
sha256: "0856437acd3a013f34cbca4448ad08bd004f387fc2b11b007b4713f00d63fcb7"
sha256: "9934724a45fdb2b12e332d8190c58713e6675c37c630d53608e0f50167215c9f"
url: "https://pub.dev"
source: hosted
version: "8.8.0"
version: "8.9.0-dev.1"
wechat_camera_picker:
dependency: "direct main"
description:
name: wechat_camera_picker
sha256: e6390e80a80f1b873b4b90cb00bbcfda865e1d80046464a84aeefe7a00978e99
sha256: "5d80afaec8b2cbcfd98d9feeee1737689e04c4151a7bd67a6efac83064beca86"
url: "https://pub.dev"
source: hosted
version: "4.1.1"
version: "4.2.0-dev.2"
win32:
dependency: transitive
description:
Expand All @@ -570,5 +578,5 @@ packages:
source: hosted
version: "0.2.0+3"
sdks:
dart: ">=3.1.0 <4.0.0"
flutter: ">=3.13.0"
dart: ">=3.2.0 <4.0.0"
flutter: ">=3.16.0"
10 changes: 5 additions & 5 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: insta_assets_picker_demo
description: The demo project for the insta_assets_picker package.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 2.2.0
version: 2.3.0-dev.1

environment:
sdk: '>=3.1.0'
flutter: '>=3.13.0'
sdk: ^3.2.0
flutter: '>=3.16.0'

dependencies:
flutter:
Expand All @@ -19,12 +19,12 @@ dependencies:
# for camera examples
path: ^1.8.3
camera: ^0.10.5+5
wechat_camera_picker: ^4.1.1
wechat_camera_picker: ^4.2.0-dev.2

dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^2.0.0
flutter_lints: any

flutter:
uses-material-design: true
1 change: 0 additions & 1 deletion example/test/widget_test.dart

This file was deleted.

14 changes: 9 additions & 5 deletions lib/src/assets_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class InstaAssetPicker {
static void _openErrorPermission(
BuildContext context,
AssetPickerTextDelegate textDelegate,
Function(BuildContext, String)? customHandler,
Function(BuildContext context, String error)? customHandler,
) {
final defaultDescription =
'${textDelegate.unableToAccessAll}\n${textDelegate.goToSystemSettings}';
Expand Down Expand Up @@ -168,8 +168,10 @@ class InstaAssetPicker {
bool closeOnComplete = false,
required Function(Stream<InstaAssetsExportDetails> exportDetails)
onCompleted,
Widget Function(BuildContext, bool)? loadingIndicatorBuilder,
Widget? Function(BuildContext, AssetPathEntity?, int)? specialItemBuilder,
Widget Function(BuildContext context, bool isAssetsEmpty)?
loadingIndicatorBuilder,
Widget? Function(BuildContext context, AssetPathEntity? path, int length)?
specialItemBuilder,
SpecialItemPosition? specialItemPosition,
InstaPickerActionsBuilder? actionsBuilder,
}) async {
Expand Down Expand Up @@ -303,7 +305,8 @@ class InstaAssetPicker {
bool closeOnComplete = false,
required Function(Stream<InstaAssetsExportDetails> exportDetails)
onCompleted,
Widget Function(BuildContext, bool)? loadingIndicatorBuilder,
Widget Function(BuildContext context, bool isAssetsEmpty)?
loadingIndicatorBuilder,

/// DefaultAssetPickerProvider options
List<AssetEntity>? selectedAssets,
Expand All @@ -315,7 +318,8 @@ class InstaAssetPicker {
bool sortPathsByModifiedDate = false,
FilterOptionGroup? filterOptions,
Duration initializeDelayDuration = _kInitializeDelayDuration,
Widget? Function(BuildContext, AssetPathEntity?, int)? specialItemBuilder,
Widget? Function(BuildContext context, AssetPathEntity? path, int length)?
specialItemBuilder,
SpecialItemPosition? specialItemPosition,
InstaPickerActionsBuilder? actionsBuilder,
}) async {
Expand Down
10 changes: 5 additions & 5 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: insta_assets_picker
description: An image picker similar with Instagram, supports multi picking, crop and aspect ratio.
version: 2.2.0
version: 2.3.0-dev.1
repository: https://github.com/LeGoffMael/insta_assets_picker
topics:
- picker
Expand All @@ -9,23 +9,23 @@ topics:
- instagram

environment:
sdk: '^3.1.0'
flutter: '>=3.13.0'
sdk: ^3.2.0
flutter: '>=3.16.0'

dependencies:
flutter:
sdk: flutter

insta_assets_crop: ^0.0.2 # custom package from image_crop
fraction: ^5.0.2 # to show crop ratio in crop view
wechat_assets_picker: ^8.8.0
wechat_assets_picker: ^8.9.0-dev.1
provider: ^6.0.5 # match with wechat_assets_picker package
extended_image: ^8.1.0 # match with wechat_assets_picker package

dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^2.0.1
flutter_lints: any

screenshots:
- description: 'Scroll animation'
Expand Down

0 comments on commit c75155d

Please sign in to comment.