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