chore: Follow up paddings
This commit is contained in:
parent
2e7eea9308
commit
7e8bb14c69
2 changed files with 92 additions and 95 deletions
|
|
@ -109,109 +109,105 @@ 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,
|
||||||
child: PopupMenuButton<String>(
|
decoration: const BoxDecoration(),
|
||||||
icon: const Icon(Icons.add_circle_outline),
|
child: PopupMenuButton<String>(
|
||||||
iconColor: theme.colorScheme.onPrimaryContainer,
|
icon: const Icon(Icons.add_circle_outline),
|
||||||
onSelected: controller.onAddPopupMenuButtonSelected,
|
iconColor: theme.colorScheme.onPrimaryContainer,
|
||||||
itemBuilder: (BuildContext context) =>
|
onSelected: controller.onAddPopupMenuButtonSelected,
|
||||||
<PopupMenuEntry<String>>[
|
itemBuilder: (BuildContext context) =>
|
||||||
if (PlatformInfos.isMobile)
|
<PopupMenuEntry<String>>[
|
||||||
PopupMenuItem<String>(
|
if (PlatformInfos.isMobile)
|
||||||
value: 'location',
|
PopupMenuItem<String>(
|
||||||
child: ListTile(
|
value: 'location',
|
||||||
leading: CircleAvatar(
|
child: ListTile(
|
||||||
backgroundColor:
|
leading: CircleAvatar(
|
||||||
theme.colorScheme.onPrimaryContainer,
|
backgroundColor:
|
||||||
foregroundColor:
|
theme.colorScheme.onPrimaryContainer,
|
||||||
theme.colorScheme.primaryContainer,
|
foregroundColor: 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),
|
||||||
contentPadding: const EdgeInsets.all(0),
|
contentPadding: const EdgeInsets.all(0),
|
||||||
),
|
|
||||||
),
|
|
||||||
PopupMenuItem<String>(
|
|
||||||
value: 'image',
|
|
||||||
child: ListTile(
|
|
||||||
leading: CircleAvatar(
|
|
||||||
backgroundColor:
|
|
||||||
theme.colorScheme.onPrimaryContainer,
|
|
||||||
foregroundColor:
|
|
||||||
theme.colorScheme.primaryContainer,
|
|
||||||
child: const Icon(Icons.photo_album_outlined),
|
|
||||||
),
|
|
||||||
title: Text(L10n.of(context).openGallery),
|
|
||||||
contentPadding: const EdgeInsets.all(0),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
PopupMenuItem<String>(
|
|
||||||
value: 'file',
|
|
||||||
child: ListTile(
|
|
||||||
leading: CircleAvatar(
|
|
||||||
backgroundColor:
|
|
||||||
theme.colorScheme.onPrimaryContainer,
|
|
||||||
foregroundColor:
|
|
||||||
theme.colorScheme.primaryContainer,
|
|
||||||
child: const Icon(Icons.attachment_outlined),
|
|
||||||
),
|
|
||||||
title: Text(L10n.of(context).sendFile),
|
|
||||||
contentPadding: const EdgeInsets.all(0),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
PopupMenuItem<String>(
|
||||||
|
value: 'image',
|
||||||
|
child: ListTile(
|
||||||
|
leading: CircleAvatar(
|
||||||
|
backgroundColor: theme.colorScheme.onPrimaryContainer,
|
||||||
|
foregroundColor: theme.colorScheme.primaryContainer,
|
||||||
|
child: const Icon(Icons.photo_album_outlined),
|
||||||
|
),
|
||||||
|
title: Text(L10n.of(context).openGallery),
|
||||||
|
contentPadding: const EdgeInsets.all(0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
PopupMenuItem<String>(
|
||||||
|
value: 'file',
|
||||||
|
child: ListTile(
|
||||||
|
leading: CircleAvatar(
|
||||||
|
backgroundColor: theme.colorScheme.onPrimaryContainer,
|
||||||
|
foregroundColor: theme.colorScheme.primaryContainer,
|
||||||
|
child: const Icon(Icons.attachment_outlined),
|
||||||
|
),
|
||||||
|
title: Text(L10n.of(context).sendFile),
|
||||||
|
contentPadding: const EdgeInsets.all(0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
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,
|
||||||
child: PopupMenuButton(
|
decoration: const BoxDecoration(),
|
||||||
icon: const Icon(Icons.camera_alt_outlined),
|
child: Center(
|
||||||
onSelected: controller.onAddPopupMenuButtonSelected,
|
child: PopupMenuButton(
|
||||||
iconColor: theme.colorScheme.onPrimaryContainer,
|
icon: const Icon(Icons.camera_alt_outlined),
|
||||||
itemBuilder: (context) => [
|
onSelected: controller.onAddPopupMenuButtonSelected,
|
||||||
PopupMenuItem<String>(
|
iconColor: theme.colorScheme.onPrimaryContainer,
|
||||||
value: 'camera-video',
|
itemBuilder: (context) => [
|
||||||
child: ListTile(
|
PopupMenuItem<String>(
|
||||||
leading: CircleAvatar(
|
value: 'camera-video',
|
||||||
backgroundColor:
|
child: ListTile(
|
||||||
theme.colorScheme.onPrimaryContainer,
|
leading: CircleAvatar(
|
||||||
foregroundColor:
|
backgroundColor:
|
||||||
theme.colorScheme.primaryContainer,
|
theme.colorScheme.onPrimaryContainer,
|
||||||
child: const Icon(Icons.videocam_outlined),
|
foregroundColor:
|
||||||
),
|
theme.colorScheme.primaryContainer,
|
||||||
title: Text(L10n.of(context).recordAVideo),
|
child: const Icon(Icons.videocam_outlined),
|
||||||
contentPadding: const EdgeInsets.all(0),
|
),
|
||||||
),
|
title: Text(L10n.of(context).recordAVideo),
|
||||||
),
|
contentPadding: const EdgeInsets.all(0),
|
||||||
PopupMenuItem<String>(
|
|
||||||
value: 'camera',
|
|
||||||
child: ListTile(
|
|
||||||
leading: CircleAvatar(
|
|
||||||
backgroundColor:
|
|
||||||
theme.colorScheme.onPrimaryContainer,
|
|
||||||
foregroundColor:
|
|
||||||
theme.colorScheme.primaryContainer,
|
|
||||||
child:
|
|
||||||
const Icon(Icons.camera_alt_outlined),
|
|
||||||
),
|
|
||||||
title: Text(L10n.of(context).takeAPhoto),
|
|
||||||
contentPadding: const EdgeInsets.all(0),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
PopupMenuItem<String>(
|
||||||
|
value: 'camera',
|
||||||
|
child: ListTile(
|
||||||
|
leading: CircleAvatar(
|
||||||
|
backgroundColor:
|
||||||
|
theme.colorScheme.onPrimaryContainer,
|
||||||
|
foregroundColor:
|
||||||
|
theme.colorScheme.primaryContainer,
|
||||||
|
child: const Icon(Icons.camera_alt_outlined),
|
||||||
|
),
|
||||||
|
title: Text(L10n.of(context).takeAPhoto),
|
||||||
|
contentPadding: const EdgeInsets.all(0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
height: height,
|
height: height,
|
||||||
|
|
|
||||||
|
|
@ -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…
Add table
Add a link
Reference in a new issue