OverlayEntry class

An entry representing a widget that can be inserted into an Overlay.

Use OverlayEntry to dynamically display floating overlays, tooltips, or menus. An entry is created with a builder function and can be removed by calling remove.

Example Usage

final entry = OverlayEntry(
  builder: (context) => Positioned(
    left: 5, top: 2,
    child: Text('Floating Alert'),
  ),
);
Overlay.of(context)?.insert(entry);

// Later:
entry.remove();

Constructors

OverlayEntry({required WidgetBuilder builder})
Creates an overlay entry with the specified builder.

Properties

builder → WidgetBuilder
The builder function that creates the widget for this entry.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove() → void
Removes this entry from the overlay it was inserted into.
toString() → String
A string representation of this object.
inherited

Operators

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