refactor: polish image picker styling

This commit is contained in:
Vick Top 2024-04-18 10:37:32 +02:00
parent c4955e6eb7
commit 158973cd7a
2 changed files with 15 additions and 1 deletions

View file

@ -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(

View file

@ -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;