Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set property to enable or disable Gesture to resize crop area and preferredCropAspectRatio bug fixed #77

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,10 @@ class CropScreen extends StatelessWidget {
child: AnimatedInteractiveViewer(
maxScale: 2.4,
child: CropGridViewer(
controller: controller, horizontalMargin: 60),
controller: controller,
horizontalMargin: 60,
enableGestureResizeCrop: true,
),
),
),
SizedBox(height: 15),
Expand All @@ -471,7 +474,7 @@ class CropScreen extends StatelessWidget {
),
buildSplashTap("16:9", 16 / 9, padding: Margin.horizontal(10)),
buildSplashTap("1:1", 1 / 1),
buildSplashTap("4:5", 4 / 5, padding: Margin.horizontal(10)),
buildSplashTap("4:5", 3 / 2, padding: Margin.horizontal(10)),
buildSplashTap("NO", null, padding: Margin.right(10)),
Expanded(
child: SplashTap(
Expand Down
87 changes: 40 additions & 47 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.8.1"
version: "2.8.2"
boolean_selector:
dependency: transitive
description:
Expand All @@ -21,7 +21,7 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0"
charcode:
dependency: transitive
description:
Expand All @@ -42,42 +42,35 @@ packages:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0"
version: "1.16.0"
cross_file:
dependency: transitive
description:
name: cross_file
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.2"
csslib:
dependency: transitive
description:
name: csslib
url: "https://pub.dartlang.org"
source: hosted
version: "0.17.1"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
version: "1.0.4"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.3.0"
ffi:
dependency: transitive
description:
name: ffi
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
version: "1.1.2"
ffmpeg_kit_flutter_min_gpl:
dependency: transitive
description:
Expand All @@ -98,7 +91,7 @@ packages:
name: file
url: "https://pub.dartlang.org"
source: hosted
version: "6.1.0"
version: "6.1.2"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -110,7 +103,7 @@ packages:
name: flutter_plugin_android_lifecycle
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
version: "2.0.5"
flutter_test:
dependency: "direct dev"
description: flutter
Expand All @@ -128,20 +121,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.1"
html:
dependency: transitive
description:
name: html
url: "https://pub.dartlang.org"
source: hosted
version: "0.15.0"
http:
dependency: transitive
description:
name: http
url: "https://pub.dartlang.org"
source: hosted
version: "0.13.1"
version: "0.13.3"
http_parser:
dependency: transitive
description:
Expand All @@ -155,35 +141,42 @@ packages:
name: image_picker
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.4+4"
version: "0.8.4+1"
image_picker_for_web:
dependency: transitive
description:
name: image_picker_for_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.4"
version: "2.1.6"
image_picker_platform_interface:
dependency: transitive
description:
name: image_picker_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.1"
version: "2.4.4"
js:
dependency: transitive
description:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.3"
version: "0.6.4"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10"
version: "0.12.11"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.4"
meta:
dependency: transitive
description:
Expand All @@ -197,70 +190,70 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
version: "1.8.1"
path_provider:
dependency: transitive
description:
name: path_provider
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
version: "2.0.4"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.1.5"
path_provider_macos:
dependency: transitive
description:
name: path_provider_macos
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.0.5"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
version: "2.0.3"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.0.5"
pedantic:
dependency: transitive
description:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.11.0"
version: "1.11.1"
platform:
dependency: transitive
description:
name: platform
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.0"
version: "3.1.0"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
version: "2.1.2"
process:
dependency: transitive
description:
name: process
url: "https://pub.dartlang.org"
source: hosted
version: "4.2.1"
version: "4.2.3"
sky_engine:
dependency: transitive
description: flutter
Expand All @@ -272,7 +265,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
version: "1.8.2"
stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -307,7 +300,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.2"
version: "0.4.9"
typed_data:
dependency: transitive
description:
Expand All @@ -321,7 +314,7 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.2"
video_editor:
dependency: "direct main"
description:
Expand All @@ -335,7 +328,7 @@ packages:
name: video_player
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.6"
version: "2.2.3"
video_player_platform_interface:
dependency: transitive
description:
Expand All @@ -349,7 +342,7 @@ packages:
name: video_player_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.0.7"
video_thumbnail:
dependency: transitive
description:
Expand All @@ -363,14 +356,14 @@ packages:
name: win32
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
version: "2.2.10"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0"
version: "0.2.0+1"
sdks:
dart: ">=2.14.0 <3.0.0"
flutter: ">=2.5.0"
dart: ">=2.17.0-0 <3.0.0"
flutter: ">=2.0.0"
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies:
helpers: ^1.1.1
image_picker: ^0.8.4
cupertino_icons: ^1.0.2
video_player: ^2.2.6
video_player: ^2.2.3

dev_dependencies:
flutter_test:
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/cover/cover_selection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class _CoverSelectionState extends State<CoverSelection>
widget.controller.addListener(_scaleRect);

// init the widget with controller values
WidgetsBinding.instance!.addPostFrameCallback((_) {
WidgetsBinding.instance.addPostFrameCallback((_) {
_scaleRect();
});
}
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/cover/cover_viewer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class _CoverViewerState extends State<CoverViewer> {
if (_layout != size) {
_layout = size;
// init the widget with controller values
WidgetsBinding.instance!
WidgetsBinding.instance
.addPostFrameCallback((_) {
_scaleRect();
});
Expand Down
Loading