mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-13 10:45:29 +00:00
Show progress dialog when requesting info from server
This commit is contained in:
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);
|
||||
}
|
Reference in New Issue
Block a user