Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
5a1ef73d
Unverified
Commit
5a1ef73d
authored
Apr 28, 2023
by
Viren Khatri
Committed by
GitHub
Apr 28, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enhances OverlayEntry docs (#124478)
Fixes
https://github.com/flutter/flutter/issues/123218
parent
3a6c4eb1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
overlay.dart
packages/flutter/lib/src/widgets/overlay.dart
+16
-8
No files found.
packages/flutter/lib/src/widgets/overlay.dart
View file @
5a1ef73d
...
@@ -58,12 +58,18 @@ import 'ticker_provider.dart';
...
@@ -58,12 +58,18 @@ import 'ticker_provider.dart';
/// As a result listeners of the [OverlayEntry] can get notified for one last
/// As a result listeners of the [OverlayEntry] can get notified for one last
/// time after the [dispose] call, when the widget is eventually unmounted.
/// time after the [dispose] call, when the widget is eventually unmounted.
///
///
/// {@macro flutter.widgets.overlayPortalVsOverlayEntry}
///
/// See also:
/// See also:
///
///
/// * [Overlay]
/// * [OverlayPortal], an alternative API for inserting widgets into an
/// * [OverlayState]
/// [Overlay] using a builder callback.
/// * [WidgetsApp]
/// * [Overlay], a stack of entries that can be managed independently.
/// * [MaterialApp]
/// * [OverlayState], the current state of an Overlay.
/// * [WidgetsApp], a convenience widget that wraps a number of widgets that
/// are commonly required for an application.
/// * [MaterialApp], a convenience widget that wraps a number of widgets that
/// are commonly required for Material Design applications.
class
OverlayEntry
implements
Listenable
{
class
OverlayEntry
implements
Listenable
{
/// Creates an overlay entry.
/// Creates an overlay entry.
///
///
...
@@ -1404,20 +1410,22 @@ class OverlayPortalController {
...
@@ -1404,20 +1410,22 @@ class OverlayPortalController {
/// [OverlayPortalController.show] was called. The last [OverlayPortal] to have
/// [OverlayPortalController.show] was called. The last [OverlayPortal] to have
/// called `show` gets to paint its overlay child in the foreground.
/// called `show` gets to paint its overlay child in the foreground.
///
///
/// {@template flutter.widgets.overlayPortalVsOverlayEntry}
/// ### Differences between [OverlayPortal] and [OverlayEntry]
/// ### Differences between [OverlayPortal] and [OverlayEntry]
///
///
/// The main difference between [OverlayEntry] and [OverlayPortal] is that
/// The main difference between [OverlayEntry] and [OverlayPortal] is that
/// [OverlayEntry] builds its widget subtree as a child of the target [Overlay],
/// [OverlayEntry] builds its widget subtree as a child of the target [Overlay],
/// while [OverlayPortal] uses [
overlayChildBuilder] to build a child widget of
/// while [OverlayPortal] uses [
OverlayPortal.overlayChildBuilder] to build a
///
itself. This allows [OverlayPortal]'s overlay child to depend on the same
///
child widget of itself. This allows [OverlayPortal]'s overlay child to depend
///
set of [InheritedWidget]s as [OverlayPortal], and it's also guaranteed that
///
on the same set of [InheritedWidget]s as [OverlayPortal], and it's also
/// the overlay child will not outlive its [OverlayPortal].
///
guaranteed that
the overlay child will not outlive its [OverlayPortal].
///
///
/// On the other hand, [OverlayPortal]'s implementation is more complex. For
/// On the other hand, [OverlayPortal]'s implementation is more complex. For
/// instance, it does a bit more work than a regular widget during global key
/// instance, it does a bit more work than a regular widget during global key
/// reparenting. If the content to be shown on the [Overlay] doesn't benefit
/// reparenting. If the content to be shown on the [Overlay] doesn't benefit
/// from being a part of [OverlayPortal]'s subtree, consider using an
/// from being a part of [OverlayPortal]'s subtree, consider using an
/// [OverlayEntry] instead.
/// [OverlayEntry] instead.
/// {@endtemplate}
///
///
/// See also:
/// See also:
///
///
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment