PositionType enum

Defines how an element establishes a positioning context for its absolutely positioned children.

This enum controls whether an element acts as a reference point for positioning its absolutely positioned descendants. Similar to CSS positioning contexts, this determines which parent an absolutely positioned child will be positioned relative to.

Used in conjunction with LayoutBehavior.absolute and position properties (top, left, right, bottom) to establish the positioning hierarchy.

Inheritance
Available extensions

Values

none → const PositionType

Does not establish a positioning context (default).

Absolutely positioned children will skip this element and position themselves relative to the nearest ancestor with PositionType.relative.

This is similar to CSS position: static where the element does not create a containing block for absolute positioning.

relative → const PositionType

Establishes a positioning context for absolutely positioned children.

Absolutely positioned children will position themselves relative to this element's top-left corner (or edges based on their position properties).

This is similar to CSS position: relative where the element creates a containing block for absolutely positioned descendants.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
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
toString() String
A string representation of this object.
inherited

Operators

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

Constants

values → const List<PositionType>
A constant List of the values in this enum, in order of their declaration.