From 02c136d7ead318e14530a23d5e96ea2fbc0b53ac Mon Sep 17 00:00:00 2001 From: mike doornenbal Date: Wed, 7 Aug 2024 13:34:04 +0200 Subject: [PATCH] fix: update image_picker dependency --- .../timeline_post_creation_screen.dart | 39 ++++++++----------- packages/flutter_timeline_view/pubspec.yaml | 2 +- 2 files changed, 17 insertions(+), 24 deletions(-) diff --git a/packages/flutter_timeline_view/lib/src/screens/timeline_post_creation_screen.dart b/packages/flutter_timeline_view/lib/src/screens/timeline_post_creation_screen.dart index 0e46e58..eaa7d1f 100644 --- a/packages/flutter_timeline_view/lib/src/screens/timeline_post_creation_screen.dart +++ b/packages/flutter_timeline_view/lib/src/screens/timeline_post_creation_screen.dart @@ -199,21 +199,13 @@ class _TimelinePostCreationScreenState var result = await showModalBottomSheet( context: context, builder: (context) => Container( - padding: const EdgeInsets.all(8.0), + padding: const EdgeInsets.all(20), color: theme.colorScheme.surface, child: ImagePicker( - imagePickerConfig: - widget.options.imagePickerConfig, - imagePickerTheme: widget - .options.imagePickerTheme ?? + config: widget.options.imagePickerConfig, + theme: widget.options.imagePickerTheme ?? ImagePickerTheme( - titleAlignment: TextAlign.center, - title: ' Do you want to upload a file' - ' or take a picture? ', - titleTextSize: - theme.textTheme.titleMedium!.fontSize!, - font: theme - .textTheme.titleMedium!.fontFamily!, + titleStyle: theme.textTheme.titleMedium, iconSize: 40, selectImageText: 'UPLOAD FILE', makePhotoText: 'TAKE PICTURE', @@ -221,18 +213,19 @@ class _TimelinePostCreationScreenState size: 40, Icons.insert_drive_file, ), + closeButtonBuilder: (onTap) => TextButton( + onPressed: () { + onTap(); + }, + child: Text( + 'Cancel', + style: theme.textTheme.bodyMedium! + .copyWith( + decoration: TextDecoration.underline, + ), + ), + ), ), - customButton: TextButton( - onPressed: () { - Navigator.pop(context); - }, - child: Text( - 'Cancel', - style: theme.textTheme.bodyMedium!.copyWith( - decoration: TextDecoration.underline, - ), - ), - ), ), ), ); diff --git a/packages/flutter_timeline_view/pubspec.yaml b/packages/flutter_timeline_view/pubspec.yaml index bb0ffbb..bd8e1fb 100644 --- a/packages/flutter_timeline_view/pubspec.yaml +++ b/packages/flutter_timeline_view/pubspec.yaml @@ -23,7 +23,7 @@ dependencies: version: ^5.0.0 flutter_image_picker: hosted: https://forgejo.internal.iconica.nl/api/packages/internal/pub - version: ^1.0.5 + version: ^4.0.0 dev_dependencies: flutter_lints: ^2.0.0