diff --git a/lib/src/components/organisms/chat/message_input.dart b/lib/src/components/organisms/chat/message_input.dart index 0db87ba..3b69228 100644 --- a/lib/src/components/organisms/chat/message_input.dart +++ b/lib/src/components/organisms/chat/message_input.dart @@ -388,44 +388,46 @@ class ZdsMessageInputState extends State with SingleTickerProvi enforceSheet: true, backgroundColor: zetaColors.surfacePrimary, context: context, + headerBuilder: (context) { + return PreferredSize( + preferredSize: const Size.fromHeight(48), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + IconButton( + icon: const Icon(ZdsIcons.close, size: 20), + onPressed: Navigator.of(context).pop, + color: zetaColors.iconSubtle, + ), + FittedBox( + fit: BoxFit.cover, + child: Text( + ComponentStrings.of(context).get('ATTACHMENTS', 'Attachments'), + style: themeData.textTheme.titleMedium, + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.center, + ), + ), + const SizedBox(width: 48), + ], + ), + ); + }, + maxHeight: 200, builder: (_) { return Scaffold( body: Material( - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Container( - height: 48, - padding: const EdgeInsets.symmetric(horizontal: 24), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - IconButton( - icon: const Icon(ZdsIcons.close, size: 24), - onPressed: Navigator.of(context).pop, - color: zetaColors.iconSubtle, - ), - Text( - ComponentStrings.of(context).get('ATTACHMENTS', 'Attachments'), - style: themeData.textTheme.headlineMedium, - ), - const SizedBox(width: 48), - ], - ), - ), - ZdsFilePicker( - useCard: false, - config: _moreConfig, - showSelected: false, - controller: modalController, - onChange: (files) { - if (files.isNotEmpty) Navigator.of(context).pop(files.first); - }, - onError: widget.onUploadError, - postProcessors: widget.postProcessors, - ).paddingOnly(top: 24, bottom: 24), - ], - ), + child: ZdsFilePicker( + useCard: false, + config: _moreConfig, + showSelected: false, + controller: modalController, + onChange: (files) { + if (files.isNotEmpty) Navigator.of(context).pop(files.first); + }, + onError: widget.onUploadError, + postProcessors: widget.postProcessors, + ).paddingOnly(top: 24, bottom: 24), ), ); },