fix: Display error when user tries to send too large file
This commit is contained in:
parent
4f9d588721
commit
aff10ab0ed
4 changed files with 18 additions and 3 deletions
|
|
@ -446,6 +446,7 @@ class ChatController extends State<Chat> {
|
|||
}
|
||||
|
||||
void voiceMessageAction() async {
|
||||
final scaffoldMessenger = ScaffoldMessenger.of(context);
|
||||
if (PlatformInfos.isAndroid) {
|
||||
final info = await DeviceInfoPlugin().androidInfo;
|
||||
if (info.version.sdkInt < 19) {
|
||||
|
|
@ -486,7 +487,16 @@ class ChatController extends State<Chat> {
|
|||
'waveform': result.waveform,
|
||||
},
|
||||
},
|
||||
);
|
||||
).catchError((e) {
|
||||
scaffoldMessenger.showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
(e as Object).toLocalizedString(context),
|
||||
),
|
||||
),
|
||||
);
|
||||
return null;
|
||||
});
|
||||
setState(() {
|
||||
replyEvent = null;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue