Skip to content

Commit 80ae511

Browse files
dialog [nfc]: Document required ancestors for BuildContext
And fix a typo.
1 parent 2aa06cf commit 80ae511

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/widgets/dialog.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,12 @@ class DialogStatus<T> {
5252
///
5353
/// Prose in [message] should have final punctuation:
5454
/// https://github.com/zulip/zulip-flutter/pull/1498#issuecomment-2853578577
55+
///
56+
/// The context argument should be a descendant of the app's main [Navigator].
5557
// This API is inspired by [ScaffoldManager.showSnackBar]. We wrap
5658
// [showDialog]'s return value, a [Future], inside [DialogStatus]
5759
// whose documentation can be accessed. This helps avoid confusion when
58-
// intepreting the meaning of the [Future].
60+
// interpreting the meaning of the [Future].
5961
DialogStatus<void> showErrorDialog({
6062
required BuildContext context,
6163
required String title,
@@ -86,6 +88,8 @@ DialogStatus<void> showErrorDialog({
8688
/// If the dialog was canceled,
8789
/// either with the cancel button or by tapping outside the dialog's area,
8890
/// it completes with null.
91+
///
92+
/// The context argument should be a descendant of the app's main [Navigator].
8993
DialogStatus<bool> showSuggestedActionDialog({
9094
required BuildContext context,
9195
required String title,

0 commit comments

Comments
 (0)