DesignOverlayPlacement class

Where a surface goes relative to its anchor.

Annotations

Constructors

DesignOverlayPlacement({DesignOverlaySide side = DesignOverlaySide.below, DesignOverlayAlign align = DesignOverlayAlign.start, double gap = 4, double margin = 8, bool flip = true, double preferredExtent = 200, bool matchAnchorWidth = true, double maxWidth = 320})
A placement on side, lined up by align.
const

Properties

align → DesignOverlayAlign
How it lines up along that side.
final
flip → bool
Whether it may move to the opposite side when its own lacks room. A leading-aligned menu with matchAnchorWidth can also align its trailing edge with the anchor to fit the screen. A trailing-aligned menu shifts only as far as the screen margin requires.
final
gap → double
Space between anchor and surface.
final
hashCode → int
The hash code for this object.
no setteroverride
margin → double
The least space between the surface and the screen's edge (beyond the safe area).
final
matchAnchorWidth → bool
Whether, above or below the anchor, it is a list opened from a field (a select's, a combobox's, a menu from a form field): as wide as the anchor, wider only as far as its widest item needs, up to maxWidth, never to the screen; with align at DesignOverlayAlign.start it starts on the anchor's leading edge. Its width is set before its first frame, so a reveal inside it (an Align or a SizeTransition growing its height) stays under the field from the start. On by default; a popover that keeps its own width (a calendar under a date field, a picker) turns it off and sizes itself, its reveals sized to their child (widthFactor: 1) so they never spread to the overlay's width. Beside the anchor it has no effect.
final
maxWidth → double
With matchAnchorWidth, the widest the surface grows past its anchor to fit its widest item, in logical pixels; an anchor wider than this keeps its own width. A long item past it wraps or fades, as the look draws it.
final
preferredExtent → double
The room it wants on its side before it flips: it flips when its side has less than this and the opposite side has more.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
side → DesignOverlaySide
The side it prefers.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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