From 451f03ac5c76c329a40f829dc6fb640ce1465bde Mon Sep 17 00:00:00 2001 From: mike doornenbal Date: Wed, 7 Aug 2024 13:50:39 +0200 Subject: [PATCH] fix: upgrade image_picker to 4.0.0 --- .../lib/src/config/chat_options.dart | 27 +++++++++---------- packages/flutter_chat_view/pubspec.yaml | 5 ++-- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/packages/flutter_chat_view/lib/src/config/chat_options.dart b/packages/flutter_chat_view/lib/src/config/chat_options.dart index 8333d79..27273b6 100644 --- a/packages/flutter_chat_view/lib/src/config/chat_options.dart +++ b/packages/flutter_chat_view/lib/src/config/chat_options.dart @@ -184,13 +184,22 @@ Widget _createImagePickerContainer( ) { var theme = Theme.of(context); return Container( - padding: const EdgeInsets.all(8.0), + padding: const EdgeInsets.all(20), color: Colors.white, child: ImagePicker( - imagePickerTheme: ImagePickerTheme( + theme: ImagePickerTheme( + closeButtonBuilder: (ontap) => TextButton( + onPressed: onClose, + child: Text( + translations.cancelImagePickerBtn, + style: theme.textTheme.bodyMedium!.copyWith( + fontSize: 18, + decoration: TextDecoration.underline, + ), + ), + ), title: translations.imagePickerTitle, - titleTextSize: 16, - titleAlignment: TextAlign.center, + titleStyle: theme.textTheme.titleMedium, iconSize: 40.0, makePhotoText: translations.takePicture, selectImageText: translations.uploadFile, @@ -199,16 +208,6 @@ Widget _createImagePickerContainer( size: 40, ), ), - customButton: TextButton( - onPressed: onClose, - child: Text( - translations.cancelImagePickerBtn, - style: theme.textTheme.bodyMedium!.copyWith( - fontSize: 18, - decoration: TextDecoration.underline, - ), - ), - ), ), ); } diff --git a/packages/flutter_chat_view/pubspec.yaml b/packages/flutter_chat_view/pubspec.yaml index 43e0f69..cc728a0 100644 --- a/packages/flutter_chat_view/pubspec.yaml +++ b/packages/flutter_chat_view/pubspec.yaml @@ -23,9 +23,8 @@ dependencies: ref: 3.1.0 cached_network_image: ^3.2.2 flutter_image_picker: - git: - url: https://github.com/Iconica-Development/flutter_image_picker - ref: 1.0.5 + hosted: https://forgejo.internal.iconica.nl/api/packages/internal/pub + version: ^4.0.0 flutter_profile: git: ref: 1.5.0