mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 19:46:25 +00:00
Improve error message handlers
This commit is contained in:
parent
02982cea5e
commit
47929c888b
2 changed files with 8 additions and 4 deletions
|
|
@ -9,13 +9,13 @@ void showMessage(BuildContext context, String message) {
|
|||
));
|
||||
}
|
||||
|
||||
Future<void> showErrorDialog(BuildContext context, String title, String description, {String error = "Error", Function onDismissed}) async {
|
||||
Future<void> showErrorDialog(BuildContext context, String title, String description, {IconData icon = FontAwesomeIcons.exclamationCircle, String error = "Error", Function onDismissed}) async {
|
||||
showDialog(
|
||||
context: context,
|
||||
child: SimpleDialog(
|
||||
title: ListTile(
|
||||
title: Text(error),
|
||||
leading: FaIcon(FontAwesomeIcons.exclamationCircle),
|
||||
leading: FaIcon(icon),
|
||||
),
|
||||
children: <Widget>[
|
||||
ListTile(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue