feat(ui): Show errors

This commit is contained in:
2022-11-22 21:58:55 +01:00
parent 04c0c1c0e2
commit 0eeac949ea
5 changed files with 75 additions and 1 deletions

View File

@@ -4,7 +4,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_vibrate/flutter_vibrate.dart';
import 'package:moxxyv2/i18n/strings.g.dart';
//import 'package:moxxyv2/shared/error_types.dart';
import 'package:moxxyv2/shared/error_types.dart';
import 'package:moxxyv2/shared/helpers.dart';
import 'package:moxxyv2/shared/models/message.dart';
import 'package:moxxyv2/shared/warning_types.dart';
@@ -323,6 +323,19 @@ class ChatBubbleState extends State<ChatBubble>
},
),
] : [],
...widget.message.errorMenuVisible ? [
_buildMessageOption(
Icons.info_outline,
'Show Error',
() {
showInfoDialog(
'Error',
errorToTranslatableString(widget.message.errorType!),
context,
);
},
),
] : [],
...widget.message.isWarning() ? [
_buildMessageOption(
Icons.warning,