simpleprogressdialog 1.0.5 simpleprogressdialog: ^1.0.5 copied to clipboard
Simple Flutter Progress Dialog that giving access to the ability to style, position and customize the content (message, title and progress indicator) .
simpleprogressdialog #
Simple Progress Dialog is an open source package with a customizable and easy to use and tweak Progress Dialog
Widgets #
ProgressDialog
- Creates a Progess Dialog for you
Examples #
1. Simple use #
class Home extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Center(
child: RaisedButton(
onPressed: (){
ProgressDialog(context: context).show(message: "Loading...");
},
),
);
}
}
2. With Title and styles. #
class Home extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Center(
child: RaisedButton(
onPressed: () {
ProgressDialog(context: context).show(
message: "Please wait...",
title: "Fetching Data",
centerTile: true,
titleStyle: TextStyle(fontSize: 40, color: Colors.orange[900]),
messageStyle: TextStyle(fontSize: 20, color: Colors.green)
);
},
),
);
}
}
3. Dismissing the dialog after 10 seconds #
class Home extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Center(
child: RaisedButton(
onPressed: () {
ProgressDialog dialog = ProgressDialog(context: context)..show(
message: "Please wait...",
title: "Fetching Data",
centerTile: true,
titleStyle: TextStyle(fontSize: 40, color: Colors.orange[900]),
messageStyle: TextStyle(fontSize: 20, color: Colors.green)
);
Timer(Duration(seconds: 10), (){dialog.dismiss();});
},
),
);
}
}