OverlayEntry class

An entry in an Overlay.

Each entry wraps a widget builder that produces the overlay content. Entries can be marked as opaque (blocking hit-testing to lower entries).

final entry = OverlayEntry(
  builder: (context) => Positioned(
    top: 10,
    left: 20,
    child: Card(child: Text('Tooltip')),
  ),
);

Constructors

OverlayEntry({required Widget builder(BuildContext context), bool opaque = false, bool maintainState = false})

Properties

builder Widget Function(BuildContext context)
Builds the overlay content.
final
hashCode int
The hash code for this object.
no setterinherited
maintainState bool
Whether to maintain state when the entry is not visible.
final
opaque bool
Whether this entry is opaque (blocks content below).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

markNeedsBuild() → void
Marks this entry as needing a rebuild.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove() → void
Removes this entry from its overlay.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited