From 69f2d542bc861c5879073c69c07b14af778a3a7c Mon Sep 17 00:00:00 2001 From: Thomas Klein Langenhorst Date: Mon, 15 Jul 2024 10:57:57 +0200 Subject: [PATCH] Upgrade flutter_image_picker to 3.0.0 --- .../lib/src/config/chat_options.dart | 23 ++++++++----------- packages/flutter_chat_view/pubspec.yaml | 2 +- 2 files changed, 11 insertions(+), 14 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 daa97e6..d0e51a1 100644 --- a/packages/flutter_chat_view/lib/src/config/chat_options.dart +++ b/packages/flutter_chat_view/lib/src/config/chat_options.dart @@ -148,22 +148,19 @@ Widget _createImagePickerContainer( padding: const EdgeInsets.all(8.0), color: Colors.white, child: ImagePicker( - imagePickerTheme: ImagePickerTheme( - title: translations.imagePickerTitle, - titleTextSize: 16, - titleAlignment: TextAlign.center, + theme: ImagePickerTheme( iconSize: 60.0, makePhotoText: translations.takePicture, selectImageText: translations.uploadFile, - ), - customButton: ElevatedButton( - style: ElevatedButton.styleFrom( - backgroundColor: Theme.of(context).primaryColor, - ), - onPressed: onClose, - child: Text( - translations.cancelImagePickerBtn, - style: const TextStyle(color: Colors.white), + closeButtonBuilder: (onCLose) => ElevatedButton( + style: ElevatedButton.styleFrom( + backgroundColor: Theme.of(context).primaryColor, + ), + onPressed: onClose, + child: Text( + translations.cancelImagePickerBtn, + style: const TextStyle(color: Colors.white), + ), ), ), ), diff --git a/packages/flutter_chat_view/pubspec.yaml b/packages/flutter_chat_view/pubspec.yaml index 9057aa0..b156bbe 100644 --- a/packages/flutter_chat_view/pubspec.yaml +++ b/packages/flutter_chat_view/pubspec.yaml @@ -25,7 +25,7 @@ dependencies: flutter_image_picker: git: url: https://github.com/Iconica-Development/flutter_image_picker - ref: 1.0.5 + ref: 3.0.0 flutter_profile: git: ref: 1.3.0