Skip to content

Commit 90c2457

Browse files
dialog [nfc]: Document required ancestors for BuildContext
And fix a typo.
1 parent 6a667d0 commit 90c2457

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
@@ -49,10 +49,12 @@ class DialogStatus<T> {
4949
///
5050
/// The [DialogStatus.result] field of the return value can be used
5151
/// for waiting for the dialog to be closed.
52+
///
53+
/// The context argument is used to look up the [Navigator] for the dialog.
5254
// This API is inspired by [ScaffoldManager.showSnackBar]. We wrap
5355
// [showDialog]'s return value, a [Future], inside [DialogStatus]
5456
// whose documentation can be accessed. This helps avoid confusion when
55-
// intepreting the meaning of the [Future].
57+
// interpreting the meaning of the [Future].
5658
DialogStatus<void> showErrorDialog({
5759
required BuildContext context,
5860
required String title,
@@ -83,6 +85,8 @@ DialogStatus<void> showErrorDialog({
8385
/// If the dialog was canceled,
8486
/// either with the cancel button or by tapping outside the dialog's area,
8587
/// it completes with null.
88+
///
89+
/// The context argument is used to look up the [Navigator] for the dialog.
8690
DialogStatus<bool> showSuggestedActionDialog({
8791
required BuildContext context,
8892
required String title,

0 commit comments

Comments
 (0)