feat: enhance error dialogs with delete functionality and improve documentation
This commit is contained in:
@@ -3,7 +3,7 @@ import 'package:flutter/services.dart';
|
||||
|
||||
import '../../../core/l10n/l10n.dart';
|
||||
|
||||
/// Visar en dialogruta med ett felmeddelande och en kopieringsknapp.
|
||||
/// Visar en dialogruta med ett felmeddelande och knappar för kopiera och ta bort.
|
||||
void showErrorDialog(BuildContext context, String errorMessage) {
|
||||
showDialog(
|
||||
context: context,
|
||||
@@ -28,6 +28,7 @@ void showErrorDialog(BuildContext context, String errorMessage) {
|
||||
child: Text(context.l10n.errorDialogCopy),
|
||||
onPressed: () {
|
||||
Clipboard.setData(ClipboardData(text: errorMessage));
|
||||
Navigator.of(context).pop();
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text(context.l10n.errorDialogCopied)),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user