chore: Follow up paddings

pull/1654/head
Krille 5 months ago
parent 2e7eea9308
commit 7e8bb14c69
No known key found for this signature in database
GPG Key ID: E067ECD60F1A0652

@ -109,12 +109,13 @@ class ChatInputRow extends StatelessWidget {
] ]
: <Widget>[ : <Widget>[
const SizedBox(width: 4), const SizedBox(width: 4),
AnimatedSize( AnimatedContainer(
duration: FluffyThemes.animationDuration, duration: FluffyThemes.animationDuration,
curve: FluffyThemes.animationCurve, curve: FluffyThemes.animationCurve,
child: controller.sendController.text.isNotEmpty width: controller.sendController.text.isNotEmpty ? 0 : height,
? null height: height,
: Center( alignment: Alignment.center,
decoration: const BoxDecoration(),
child: PopupMenuButton<String>( child: PopupMenuButton<String>(
icon: const Icon(Icons.add_circle_outline), icon: const Icon(Icons.add_circle_outline),
iconColor: theme.colorScheme.onPrimaryContainer, iconColor: theme.colorScheme.onPrimaryContainer,
@ -128,8 +129,7 @@ class ChatInputRow extends StatelessWidget {
leading: CircleAvatar( leading: CircleAvatar(
backgroundColor: backgroundColor:
theme.colorScheme.onPrimaryContainer, theme.colorScheme.onPrimaryContainer,
foregroundColor: foregroundColor: theme.colorScheme.primaryContainer,
theme.colorScheme.primaryContainer,
child: const Icon(Icons.gps_fixed_outlined), child: const Icon(Icons.gps_fixed_outlined),
), ),
title: Text(L10n.of(context).shareLocation), title: Text(L10n.of(context).shareLocation),
@ -140,10 +140,8 @@ class ChatInputRow extends StatelessWidget {
value: 'image', value: 'image',
child: ListTile( child: ListTile(
leading: CircleAvatar( leading: CircleAvatar(
backgroundColor: backgroundColor: theme.colorScheme.onPrimaryContainer,
theme.colorScheme.onPrimaryContainer, foregroundColor: theme.colorScheme.primaryContainer,
foregroundColor:
theme.colorScheme.primaryContainer,
child: const Icon(Icons.photo_album_outlined), child: const Icon(Icons.photo_album_outlined),
), ),
title: Text(L10n.of(context).openGallery), title: Text(L10n.of(context).openGallery),
@ -154,10 +152,8 @@ class ChatInputRow extends StatelessWidget {
value: 'file', value: 'file',
child: ListTile( child: ListTile(
leading: CircleAvatar( leading: CircleAvatar(
backgroundColor: backgroundColor: theme.colorScheme.onPrimaryContainer,
theme.colorScheme.onPrimaryContainer, foregroundColor: theme.colorScheme.primaryContainer,
foregroundColor:
theme.colorScheme.primaryContainer,
child: const Icon(Icons.attachment_outlined), child: const Icon(Icons.attachment_outlined),
), ),
title: Text(L10n.of(context).sendFile), title: Text(L10n.of(context).sendFile),
@ -167,14 +163,15 @@ class ChatInputRow extends StatelessWidget {
], ],
), ),
), ),
),
if (PlatformInfos.isMobile) if (PlatformInfos.isMobile)
AnimatedSize( AnimatedContainer(
duration: FluffyThemes.animationDuration, duration: FluffyThemes.animationDuration,
curve: FluffyThemes.animationCurve, curve: FluffyThemes.animationCurve,
child: controller.sendController.text.isNotEmpty width: controller.sendController.text.isNotEmpty ? 0 : height,
? null height: height,
: Center( alignment: Alignment.center,
decoration: const BoxDecoration(),
child: Center(
child: PopupMenuButton( child: PopupMenuButton(
icon: const Icon(Icons.camera_alt_outlined), icon: const Icon(Icons.camera_alt_outlined),
onSelected: controller.onAddPopupMenuButtonSelected, onSelected: controller.onAddPopupMenuButtonSelected,
@ -202,8 +199,7 @@ class ChatInputRow extends StatelessWidget {
theme.colorScheme.onPrimaryContainer, theme.colorScheme.onPrimaryContainer,
foregroundColor: foregroundColor:
theme.colorScheme.primaryContainer, theme.colorScheme.primaryContainer,
child: child: const Icon(Icons.camera_alt_outlined),
const Icon(Icons.camera_alt_outlined),
), ),
title: Text(L10n.of(context).takeAPhoto), title: Text(L10n.of(context).takeAPhoto),
contentPadding: const EdgeInsets.all(0), contentPadding: const EdgeInsets.all(0),

@ -255,8 +255,9 @@ class SendFileDialogState extends State<SendFileDialog> {
return Image.memory( return Image.memory(
bytes, bytes,
height: 256, height: 256,
width: width: widget.files.length == 1
widget.files.length == 1 ? 256 : null, ? 256 - 24
: null,
fit: BoxFit.contain, fit: BoxFit.contain,
errorBuilder: (context, e, s) { errorBuilder: (context, e, s) {
Logs() Logs()

Loading…
Cancel
Save