voice message sending bug fixed

This commit is contained in:
MohammadTaha Basiri 2022-03-07 13:57:42 +03:30
parent 24120c7f3d
commit d47a556762
1 changed files with 1 additions and 3 deletions

View File

@ -102,7 +102,7 @@ class _TypingState extends State<_Typing> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final state = context.read<DirectState>(); final state = context.watch<DirectState>();
return Row( return Row(
children: [ children: [
Expanded( Expanded(
@ -115,7 +115,6 @@ class _TypingState extends State<_Typing> {
), ),
child: state.text != null && state.text!.isNotEmpty child: state.text != null && state.text!.isNotEmpty
? DidvanIconButton( ? DidvanIconButton(
key: const ValueKey(1),
icon: DidvanIcons.send_solid, icon: DidvanIcons.send_solid,
onPressed: () { onPressed: () {
_formKey.currentState!.reset(); _formKey.currentState!.reset();
@ -125,7 +124,6 @@ class _TypingState extends State<_Typing> {
color: Theme.of(context).colorScheme.focusedBorder, color: Theme.of(context).colorScheme.focusedBorder,
) )
: DidvanIconButton( : DidvanIconButton(
key: const ValueKey(2),
icon: DidvanIcons.mic_solid, icon: DidvanIcons.mic_solid,
onPressed: state.startRecording, onPressed: state.startRecording,
size: 32, size: 32,