You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:watermanagement/settings.dart';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Dialogs {
|
|
|
|
static Future<void> showLoadingDialog(BuildContext context, GlobalKey key) async {
|
|
|
|
return showDialog<void>(
|
|
|
|
context: context,
|
|
|
|
barrierDismissible: false,
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
return new WillPopScope(
|
|
|
|
onWillPop: () async => false,
|
|
|
|
child: SimpleDialog(
|
|
|
|
key: key,
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
children: <Widget>[
|
|
|
|
Center(
|
|
|
|
child: Column(children: [
|
|
|
|
CircularProgressIndicator(
|
|
|
|
valueColor: new AlwaysStoppedAnimation<Color>(AppBarGradient_1),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
height: 10,
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
AppSettings.preloadText,
|
|
|
|
style: PreloaderText(),
|
|
|
|
),
|
|
|
|
]),
|
|
|
|
)
|
|
|
|
]));
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|