chore: Follow up paddings in room input row
This commit is contained in:
parent
8da9ef06ff
commit
2e7eea9308
2 changed files with 223 additions and 215 deletions
|
|
@ -114,7 +114,8 @@ class ChatInputRow extends StatelessWidget {
|
||||||
curve: FluffyThemes.animationCurve,
|
curve: FluffyThemes.animationCurve,
|
||||||
child: controller.sendController.text.isNotEmpty
|
child: controller.sendController.text.isNotEmpty
|
||||||
? null
|
? null
|
||||||
: PopupMenuButton<String>(
|
: Center(
|
||||||
|
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,
|
||||||
onSelected: controller.onAddPopupMenuButtonSelected,
|
onSelected: controller.onAddPopupMenuButtonSelected,
|
||||||
|
|
@ -166,13 +167,15 @@ class ChatInputRow extends StatelessWidget {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
if (PlatformInfos.isMobile)
|
if (PlatformInfos.isMobile)
|
||||||
AnimatedSize(
|
AnimatedSize(
|
||||||
duration: FluffyThemes.animationDuration,
|
duration: FluffyThemes.animationDuration,
|
||||||
curve: FluffyThemes.animationCurve,
|
curve: FluffyThemes.animationCurve,
|
||||||
child: controller.sendController.text.isNotEmpty
|
child: controller.sendController.text.isNotEmpty
|
||||||
? null
|
? null
|
||||||
: PopupMenuButton(
|
: Center(
|
||||||
|
child: PopupMenuButton(
|
||||||
icon: const Icon(Icons.camera_alt_outlined),
|
icon: const Icon(Icons.camera_alt_outlined),
|
||||||
onSelected: controller.onAddPopupMenuButtonSelected,
|
onSelected: controller.onAddPopupMenuButtonSelected,
|
||||||
iconColor: theme.colorScheme.onPrimaryContainer,
|
iconColor: theme.colorScheme.onPrimaryContainer,
|
||||||
|
|
@ -199,7 +202,8 @@ class ChatInputRow extends StatelessWidget {
|
||||||
theme.colorScheme.onPrimaryContainer,
|
theme.colorScheme.onPrimaryContainer,
|
||||||
foregroundColor:
|
foregroundColor:
|
||||||
theme.colorScheme.primaryContainer,
|
theme.colorScheme.primaryContainer,
|
||||||
child: const Icon(Icons.camera_alt_outlined),
|
child:
|
||||||
|
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),
|
||||||
|
|
@ -208,6 +212,7 @@ class ChatInputRow extends StatelessWidget {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
Container(
|
Container(
|
||||||
height: height,
|
height: height,
|
||||||
width: height,
|
width: height,
|
||||||
|
|
|
||||||
|
|
@ -202,8 +202,9 @@ class SendFileDialogState extends State<SendFileDialog> {
|
||||||
title: Text(sendStr),
|
title: Text(sendStr),
|
||||||
content: SizedBox(
|
content: SizedBox(
|
||||||
width: 256,
|
width: 256,
|
||||||
child: ListView(
|
child: SingleChildScrollView(
|
||||||
shrinkWrap: true,
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
if (uniqueFileType == 'image')
|
if (uniqueFileType == 'image')
|
||||||
|
|
@ -230,8 +231,8 @@ class SendFileDialogState extends State<SendFileDialog> {
|
||||||
final bytes = snapshot.data;
|
final bytes = snapshot.data;
|
||||||
if (bytes == null) {
|
if (bytes == null) {
|
||||||
return const Center(
|
return const Center(
|
||||||
child:
|
child: CircularProgressIndicator
|
||||||
CircularProgressIndicator.adaptive(),
|
.adaptive(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (snapshot.error != null) {
|
if (snapshot.error != null) {
|
||||||
|
|
@ -258,7 +259,8 @@ class SendFileDialogState extends State<SendFileDialog> {
|
||||||
widget.files.length == 1 ? 256 : null,
|
widget.files.length == 1 ? 256 : null,
|
||||||
fit: BoxFit.contain,
|
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(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 256,
|
width: 256,
|
||||||
|
|
@ -380,6 +382,7 @@ class SendFileDialogState extends State<SendFileDialog> {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
AdaptiveDialogAction(
|
AdaptiveDialogAction(
|
||||||
onPressed: () =>
|
onPressed: () =>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue