mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-28 05:26:47 +00:00
41 lines
944 B
Dart
41 lines
944 B
Dart
|
|
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|
|
|
void showErrorDialog(BuildContext context, String title, String description) {
|
|
showDialog(
|
|
context: context,
|
|
child: SimpleDialog(
|
|
title: ListTile(
|
|
title: Text("Error"),
|
|
leading: FaIcon(FontAwesomeIcons.exclamationCircle),
|
|
),
|
|
children: <Widget>[
|
|
ListTile(
|
|
title: Text(title),
|
|
subtitle: Text(description)
|
|
)
|
|
]
|
|
)
|
|
);
|
|
}
|
|
|
|
void showProgressDialog(BuildContext context, String title, String description) {
|
|
|
|
showDialog(
|
|
context: context,
|
|
barrierDismissible: false,
|
|
child: SimpleDialog(
|
|
title: Text(title),
|
|
children: <Widget>[
|
|
CircularProgressIndicator(),
|
|
Text(description),
|
|
],
|
|
)
|
|
);
|
|
}
|
|
|
|
void hideProgressDialog(BuildContext context) {
|
|
Navigator.pop(context);
|
|
} |