chore: Follow up recording on web
This commit is contained in:
parent
299174c922
commit
413352628e
1 changed files with 34 additions and 25 deletions
|
|
@ -1,3 +1,4 @@
|
||||||
|
import 'package:fluffychat/widgets/hover_builder.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:animations/animations.dart';
|
import 'package:animations/animations.dart';
|
||||||
|
|
@ -362,10 +363,15 @@ class ChatInputRow extends StatelessWidget {
|
||||||
PlatformInfos.platformCanRecord &&
|
PlatformInfos.platformCanRecord &&
|
||||||
!controller.sendController.text.isNotEmpty &&
|
!controller.sendController.text.isNotEmpty &&
|
||||||
controller.editEvent == null
|
controller.editEvent == null
|
||||||
? IconButton(
|
? HoverBuilder(
|
||||||
|
builder: (context, hovered) => IconButton(
|
||||||
tooltip: L10n.of(context).voiceMessage,
|
tooltip: L10n.of(context).voiceMessage,
|
||||||
onPressed: () =>
|
onPressed: hovered
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
? () => recordingViewModel.startRecording(
|
||||||
|
controller.room,
|
||||||
|
)
|
||||||
|
: () => ScaffoldMessenger.of(context)
|
||||||
|
.showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
margin: EdgeInsets.only(
|
margin: EdgeInsets.only(
|
||||||
bottom: height + 16,
|
bottom: height + 16,
|
||||||
|
|
@ -387,7 +393,10 @@ class ChatInputRow extends StatelessWidget {
|
||||||
backgroundColor: theme.bubbleColor,
|
backgroundColor: theme.bubbleColor,
|
||||||
foregroundColor: theme.onBubbleColor,
|
foregroundColor: theme.onBubbleColor,
|
||||||
),
|
),
|
||||||
icon: const Icon(Icons.mic_none_outlined),
|
icon: Icon(
|
||||||
|
hovered ? Icons.mic : Icons.mic_none_outlined,
|
||||||
|
),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
: IconButton(
|
: IconButton(
|
||||||
tooltip: L10n.of(context).send,
|
tooltip: L10n.of(context).send,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue