chore: Follow up send file dialog design

pull/1654/head
Krille 4 months ago
parent 4f67992d9e
commit 8da9ef06ff
No known key found for this signature in database
GPG Key ID: E067ECD60F1A0652

@ -202,8 +202,8 @@ class SendFileDialogState extends State<SendFileDialog> {
title: Text(sendStr), title: Text(sendStr),
content: SizedBox( content: SizedBox(
width: 256, width: 256,
child: Column( child: ListView(
mainAxisSize: MainAxisSize.min, shrinkWrap: true,
children: [ children: [
const SizedBox(height: 12), const SizedBox(height: 12),
if (uniqueFileType == 'image') if (uniqueFileType == 'image')
@ -222,6 +222,7 @@ class SendFileDialogState extends State<SendFileDialog> {
borderRadius: BorderRadius.circular( borderRadius: BorderRadius.circular(
AppConfig.borderRadius / 2, AppConfig.borderRadius / 2,
), ),
color: Colors.black,
clipBehavior: Clip.hardEdge, clipBehavior: Clip.hardEdge,
child: FutureBuilder( child: FutureBuilder(
future: widget.files[i].readAsBytes(), future: widget.files[i].readAsBytes(),
@ -253,6 +254,9 @@ class SendFileDialogState extends State<SendFileDialog> {
return Image.memory( return Image.memory(
bytes, bytes,
height: 256, height: 256,
width:
widget.files.length == 1 ? 256 : null,
fit: BoxFit.contain,
errorBuilder: (context, e, s) { errorBuilder: (context, e, s) {
Logs().w('Unable to preview image', e, s); Logs().w('Unable to preview image', e, s);
return const Center( return const Center(
@ -315,7 +319,7 @@ class SendFileDialogState extends State<SendFileDialog> {
), ),
if (widget.files.length == 1) if (widget.files.length == 1)
Padding( Padding(
padding: const EdgeInsets.symmetric(vertical: 12.0), padding: const EdgeInsets.only(bottom: 8.0),
child: DialogTextField( child: DialogTextField(
controller: _labelTextController, controller: _labelTextController,
labelText: L10n.of(context).optionalMessage, labelText: L10n.of(context).optionalMessage,

Loading…
Cancel
Save