From 158973cd7ae4dee47fb8628ba4693850800c3fbe Mon Sep 17 00:00:00 2001 From: Vick Top Date: Thu, 18 Apr 2024 10:37:32 +0200 Subject: [PATCH] refactor: polish image picker styling --- .../flutter_chat_view/lib/src/config/chat_options.dart | 10 +++++++++- .../lib/src/config/chat_translations.dart | 6 ++++++ 2 files changed, 15 insertions(+), 1 deletion(-) 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 00e8b05..54fb1fb 100644 --- a/packages/flutter_chat_view/lib/src/config/chat_options.dart +++ b/packages/flutter_chat_view/lib/src/config/chat_options.dart @@ -137,9 +137,17 @@ Widget _createImagePickerContainer( padding: const EdgeInsets.all(8.0), color: Colors.white, child: ImagePicker( + imagePickerTheme: ImagePickerTheme( + title: translations.imagePickerTitle, + titleTextSize: 16, + titleAlignment: TextAlign.center, + iconSize: 60.0, + makePhotoText: translations.takePicture, + selectImageText: translations.uploadFile, + ), customButton: ElevatedButton( style: ElevatedButton.styleFrom( - backgroundColor: Colors.black, + backgroundColor: const Color.fromRGBO(113, 198, 209, 1), ), onPressed: onClose, child: Text( diff --git a/packages/flutter_chat_view/lib/src/config/chat_translations.dart b/packages/flutter_chat_view/lib/src/config/chat_translations.dart index fc17e1f..9744f06 100644 --- a/packages/flutter_chat_view/lib/src/config/chat_translations.dart +++ b/packages/flutter_chat_view/lib/src/config/chat_translations.dart @@ -26,6 +26,9 @@ class ChatTranslations { this.anonymousUser = 'Anonymous user', this.chatCantBeDeleted = 'This chat can\'t be deleted', this.chatProfileUsers = 'Users:', + this.imagePickerTitle = 'Do you want to upload a file or take a picture?', + this.uploadFile = 'UPLOAD FILE', + this.takePicture = 'TAKE PICTURE', }); final String chatsTitle; @@ -48,6 +51,9 @@ class ChatTranslations { final String noChatsFound; final String chatCantBeDeleted; final String chatProfileUsers; + final String imagePickerTitle; + final String uploadFile; + final String takePicture; /// Shown when the user has no name final String anonymousUser;