showProgressDialog method
Shows progress dialog
Implementation
Future<void> showProgressDialog(
final String message,
final BuildContext context,
final bool dismissible,
final Widget? progressIndicator,
final TextStyle? textStyle,
final Color? dialogBackgroundColor) {
final Widget indicator = progressIndicator != null
? progressIndicator
: CircularProgressIndicator(backgroundColor: Colors.orangeAccent);
final style =
textStyle != null ? textStyle : TextStyle(color: Colors.black);
return showDialog(
context: context,
barrierDismissible: dismissible,
builder: (BuildContext context) {
return AlertDialog(
backgroundColor: dialogBackgroundColor,
content: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
indicator,
Text(
message,
textAlign: TextAlign.center,
style: style,
)
],
),
);
},
);
}