chore: Follow up input bar design
This commit is contained in:
parent
20fd4dcf59
commit
7183158cf9
3 changed files with 25 additions and 20 deletions
|
|
@ -266,6 +266,7 @@ class ChatInputRow extends StatelessWidget {
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
height: height,
|
height: height,
|
||||||
|
width: height,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: AnimatedCrossFade(
|
child: AnimatedCrossFade(
|
||||||
crossFadeState: PlatformInfos.platformCanRecord &&
|
crossFadeState: PlatformInfos.platformCanRecord &&
|
||||||
|
|
@ -274,19 +275,32 @@ class ChatInputRow extends StatelessWidget {
|
||||||
: CrossFadeState.showSecond,
|
: CrossFadeState.showSecond,
|
||||||
duration: FluffyThemes.animationDuration,
|
duration: FluffyThemes.animationDuration,
|
||||||
sizeCurve: FluffyThemes.animationCurve,
|
sizeCurve: FluffyThemes.animationCurve,
|
||||||
firstChild: IconButton(
|
firstChild: FloatingActionButton.small(
|
||||||
tooltip: L10n.of(context)!.voiceMessage,
|
tooltip: L10n.of(context)!.voiceMessage,
|
||||||
onPressed: controller.voiceMessageAction,
|
onPressed: controller.voiceMessageAction,
|
||||||
icon: const Icon(Icons.mic_none_outlined),
|
elevation: 0,
|
||||||
|
heroTag: null,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(height),
|
||||||
|
),
|
||||||
|
backgroundColor: Theme.of(context).colorScheme.primary,
|
||||||
|
foregroundColor: Theme.of(context).colorScheme.onPrimary,
|
||||||
|
child: const Icon(Icons.mic_none_outlined),
|
||||||
),
|
),
|
||||||
secondChild: IconButton(
|
secondChild: FloatingActionButton.small(
|
||||||
tooltip: L10n.of(context)!.voiceMessage,
|
tooltip: L10n.of(context)!.voiceMessage,
|
||||||
onPressed: controller.send,
|
onPressed: controller.send,
|
||||||
icon: const Icon(Icons.send_outlined),
|
elevation: 0,
|
||||||
|
heroTag: null,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(height),
|
||||||
|
),
|
||||||
|
backgroundColor: Theme.of(context).colorScheme.secondary,
|
||||||
|
foregroundColor: Theme.of(context).colorScheme.onSecondary,
|
||||||
|
child: const Icon(Icons.send_outlined),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 4),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -285,15 +285,9 @@ class ChatView extends StatelessWidget {
|
||||||
clipBehavior: Clip.hardEdge,
|
clipBehavior: Clip.hardEdge,
|
||||||
color: Theme.of(context)
|
color: Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.onInverseSurface
|
.surfaceVariant,
|
||||||
.withOpacity(0.9),
|
borderRadius: const BorderRadius.all(
|
||||||
shape: RoundedRectangleBorder(
|
Radius.circular(24),
|
||||||
borderRadius: const BorderRadius.all(
|
|
||||||
Radius.circular(24),
|
|
||||||
),
|
|
||||||
side: BorderSide(
|
|
||||||
color: Theme.of(context).dividerColor,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
child: controller.room.isAbandonedDMRoom == true
|
child: controller.room.isAbandonedDMRoom == true
|
||||||
? Row(
|
? Row(
|
||||||
|
|
|
||||||
|
|
@ -13,15 +13,12 @@ class StateMessage extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
||||||
horizontal: 8.0,
|
|
||||||
vertical: 4.0,
|
|
||||||
),
|
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.all(8),
|
padding: const EdgeInsets.all(8),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).colorScheme.onInverseSurface,
|
color: Theme.of(context).colorScheme.background,
|
||||||
borderRadius: BorderRadius.circular(AppConfig.borderRadius / 2),
|
borderRadius: BorderRadius.circular(AppConfig.borderRadius / 2),
|
||||||
),
|
),
|
||||||
child: FutureBuilder<String>(
|
child: FutureBuilder<String>(
|
||||||
|
|
@ -34,7 +31,7 @@ class StateMessage extends StatelessWidget {
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14 * AppConfig.fontSizeFactor,
|
fontSize: 13 * AppConfig.fontSizeFactor,
|
||||||
color: Theme.of(context).colorScheme.onSecondaryContainer,
|
color: Theme.of(context).colorScheme.onSecondaryContainer,
|
||||||
decoration:
|
decoration:
|
||||||
event.redacted ? TextDecoration.lineThrough : null,
|
event.redacted ? TextDecoration.lineThrough : null,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue