feat(ui): Show a toast when the record button is tapped
This commit is contained in:
parent
cc13078ec5
commit
9affa0e89a
@ -69,6 +69,9 @@
|
||||
"warnings": {
|
||||
"message": {
|
||||
"integrityCheckFailed": "Could not verify file integrity"
|
||||
},
|
||||
"conversation": {
|
||||
"holdForLonger": "Hold button to record a voice message"
|
||||
}
|
||||
},
|
||||
"pages": {
|
||||
|
@ -69,6 +69,9 @@
|
||||
"warnings": {
|
||||
"message": {
|
||||
"integrityCheckFailed": "Konnte Integrität der Datei nicht überprüfen"
|
||||
},
|
||||
"conversation": {
|
||||
"holdForLonger": "Button länger gedrückt halten, um eine Sprachnachricht aufzunehmen"
|
||||
}
|
||||
},
|
||||
"pages": {
|
||||
|
@ -3,6 +3,8 @@ import 'package:emoji_picker_flutter/emoji_picker_flutter.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_vibrate/flutter_vibrate.dart';
|
||||
import 'package:fluttertoast/fluttertoast.dart';
|
||||
import 'package:moxxyv2/i18n/strings.g.dart';
|
||||
import 'package:moxxyv2/shared/helpers.dart';
|
||||
import 'package:moxxyv2/ui/bloc/conversation_bloc.dart';
|
||||
import 'package:moxxyv2/ui/constants.dart';
|
||||
@ -313,7 +315,14 @@ class ConversationBottomRowState extends State<ConversationBottomRow> {
|
||||
heroTag: 'fabRest',
|
||||
onPressed: () {
|
||||
switch (state.sendButtonState) {
|
||||
case SendButtonState.audio: return;
|
||||
case SendButtonState.audio:
|
||||
Vibrate.feedback(FeedbackType.heavy);
|
||||
Fluttertoast.showToast(
|
||||
msg: t.warnings.conversation.holdForLonger,
|
||||
gravity: ToastGravity.SNACKBAR,
|
||||
toastLength: Toast.LENGTH_SHORT,
|
||||
);
|
||||
return;
|
||||
case SendButtonState.cancelCorrection:
|
||||
context.read<ConversationBloc>().add(
|
||||
MessageEditCancelledEvent(),
|
||||
|
@ -483,6 +483,13 @@ packages:
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
fluttertoast:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: fluttertoast
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "8.1.1"
|
||||
freezed:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
|
@ -38,6 +38,7 @@ dependencies:
|
||||
flutter_secure_storage: 5.0.2
|
||||
flutter_speed_dial: 6.0.0
|
||||
flutter_vibrate: 1.3.0
|
||||
fluttertoast: 8.1.1
|
||||
freezed_annotation: 2.1.0
|
||||
get_it: 7.2.0
|
||||
hex: 0.2.0
|
||||
|
Loading…
Reference in New Issue
Block a user