From f3c84ce20f60cc5f2419c79ad76b90f213407360 Mon Sep 17 00:00:00 2001 From: yim Date: Wed, 29 Nov 2023 07:22:24 +0800 Subject: [PATCH] Added some documentation for OverlayPortal (#138934) Fixes: #138836 Adds some comments to OverlayPortal to clarify its behavior. --- packages/flutter/lib/src/widgets/overlay.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/flutter/lib/src/widgets/overlay.dart b/packages/flutter/lib/src/widgets/overlay.dart index cdb7177c4c..cb27b58dc1 100644 --- a/packages/flutter/lib/src/widgets/overlay.dart +++ b/packages/flutter/lib/src/widgets/overlay.dart @@ -1474,7 +1474,9 @@ class OverlayPortalController { /// widget can depend on. /// /// This widget requires an [Overlay] ancestor in the widget tree when its -/// overlay child is showing. +/// overlay child is showing. The overlay child is rendered by the [Overlay] +/// ancestor, not by the widget itself. This allows the overlay child to float +/// above other widgets, independent of its position in the widget tree. /// /// When [OverlayPortalController.hide] is called, the widget built using /// [overlayChildBuilder] will be removed from the widget tree the next time the