From 6a7958d55faf6f6639e537db1b78d10421aa4378 Mon Sep 17 00:00:00 2001 From: "John M. Wargo" Date: Sat, 15 Aug 2020 10:20:54 -0400 Subject: [PATCH] Added message text to constructor If I want to make a simple progress dialog with some text, I can't do that without creating, then styling the dialog (two steps that could be one). In this change, To fix this, I added the `message` property to the constructor so I can do both in a single call: ```dart pr = ProgressDialog( context, type: ProgressDialogType.Normal, message: 'This is my message', isDismissible: false, ); ``` --- lib/progress_dialog.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/progress_dialog.dart b/lib/progress_dialog.dart index 2b8b2e23..49096729 100755 --- a/lib/progress_dialog.dart +++ b/lib/progress_dialog.dart @@ -39,11 +39,13 @@ class ProgressDialog { ProgressDialog(BuildContext context, {ProgressDialogType type, + String message, bool isDismissible, bool showLogs, TextDirection textDirection, Widget customBody}) { _context = context; + _dialogMessage = message ?? _dialogMessage; _progressDialogType = type ?? ProgressDialogType.Normal; _barrierDismissible = isDismissible ?? true; _showLogs = showLogs ?? false;