progress_dialog 1.0.3 progress_dialog: ^1.0.3 copied to clipboard
A light weight library to easily manage a progress dialog with simple steps whenever you need to do it. You can easily show and hide it.
import 'package:progress_dialog/progress_dialog.dart';
import 'package:flutter/material.dart';
ProgressDialog pr;
void main() {
runApp(MaterialApp(
home: MyApp(),
));
}
class MyApp extends StatelessWidget {
int count = 0;
@override
Widget build(BuildContext context) {
pr = new ProgressDialog(context);
pr.setMessage('Please wait...');
return Scaffold(
body: Center(
child: RaisedButton(
child: Text(
'Show Dialog',
style: TextStyle(color: Colors.white),
),
color: Colors.blue,
onPressed: () {
pr.show();
Future.delayed(Duration(seconds: 3)).whenComplete(() {
pr.hide();
});
}),
),
);
}
}