Fix(example): image_cropper outdated version (#2100)

pull/2103/head
Cat 8 months ago committed by GitHub
parent f93ce63dcb
commit ac573df0fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 21
      example/lib/screens/quill/my_quill_toolbar.dart
  2. 4
      example/pubspec.yaml

@ -31,16 +31,16 @@ class MyQuillToolbar extends StatelessWidget {
) async { ) async {
final croppedFile = await ImageCropper().cropImage( final croppedFile = await ImageCropper().cropImage(
sourcePath: image, sourcePath: image,
aspectRatioPresets: [
CropAspectRatioPreset.square,
CropAspectRatioPreset.ratio3x2,
CropAspectRatioPreset.original,
CropAspectRatioPreset.ratio4x3,
CropAspectRatioPreset.ratio16x9
],
uiSettings: [ uiSettings: [
AndroidUiSettings( AndroidUiSettings(
toolbarTitle: 'Cropper', toolbarTitle: 'Cropper',
aspectRatioPresets: [
CropAspectRatioPreset.square,
CropAspectRatioPreset.ratio3x2,
CropAspectRatioPreset.original,
CropAspectRatioPreset.ratio4x3,
CropAspectRatioPreset.ratio16x9
],
toolbarColor: Colors.deepOrange, toolbarColor: Colors.deepOrange,
toolbarWidgetColor: Colors.white, toolbarWidgetColor: Colors.white,
initAspectRatio: CropAspectRatioPreset.original, initAspectRatio: CropAspectRatioPreset.original,
@ -48,6 +48,13 @@ class MyQuillToolbar extends StatelessWidget {
), ),
IOSUiSettings( IOSUiSettings(
title: 'Cropper', title: 'Cropper',
aspectRatioPresets: [
CropAspectRatioPreset.square,
CropAspectRatioPreset.ratio3x2,
CropAspectRatioPreset.original,
CropAspectRatioPreset.ratio4x3,
CropAspectRatioPreset.ratio16x9
],
), ),
WebUiSettings( WebUiSettings(
context: context, context: context,

@ -35,7 +35,7 @@ dependencies:
json_annotation: ^4.8.1 json_annotation: ^4.8.1
# Plugins # Plugins
image_cropper: ^5.0.1 image_cropper: ^8.0.1
path_provider: ^2.1.2 path_provider: ^2.1.2
# For drag and drop feature # For drag and drop feature
desktop_drop: ^0.4.4 desktop_drop: ^0.4.4
@ -99,4 +99,4 @@ flutter:
fonts: fonts:
- asset: assets/fonts/RobotoMono-Regular.ttf - asset: assets/fonts/RobotoMono-Regular.ttf
flutter_gen: flutter_gen:

Loading…
Cancel
Save