27 lines
1.0 KiB
Dart
27 lines
1.0 KiB
Dart
import 'package:aman_kassa_flutter/shared/app_colors.dart';
|
||
import 'package:flutter/material.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.black54,
|
||
children: <Widget>[
|
||
Center(
|
||
child: Column(children: [
|
||
CircularProgressIndicator(),
|
||
SizedBox(height: 10,),
|
||
Text("Подождите выполняеться операция с сервером", textAlign: TextAlign.center, style: TextStyle(color: Colors.grey.shade300, fontWeight: FontWeight.bold, fontSize: 15),)
|
||
]),
|
||
)
|
||
]));
|
||
});
|
||
}
|
||
} |