mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Show progress dialog when requesting info from server
This commit is contained in:
parent
83cc92c422
commit
ca7505796d
2 changed files with 45 additions and 0 deletions
21
lib/widget/dialogs.dart
Normal file
21
lib/widget/dialogs.dart
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue