LayoutOverflow class final

Controls overflow behavior and scrollability of a layout container.

LayoutOverflow defines how a container handles content that exceeds its bounds. It combines three boolean flags to control visibility, clipping, and scrolling:

  • allowOverflow: Whether content can overflow without being clipped
  • clipContent: Whether overflowing content is clipped (hidden)
  • allowScrolling: Whether the container can scroll to reveal overflowed content

Common patterns:

  • visible: No clipping, no scrolling (content may overflow visibly)
  • scroll: Clipped and scrollable (standard scrolling behavior)
  • hidden: Clipped but not scrollable (content is hidden)
  • scrollX/scrollY: Scrolling in one direction only

Constructors

LayoutOverflow(bool scrollable, bool clipContent, bool reverse)
Creates a layout overflow configuration.
const

Properties

clipContent → bool
Whether content that exceeds the container bounds should be clipped (hidden).
final
hashCode → int
The hash code for this object.
no setteroverride
reverse → bool
Whether the scroll direction is reversed.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scrollable → bool
Whether the content can be scrolled within the container.
final

Methods

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

Operators

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

Constants

clip → const LayoutOverflow
Content does not scroll but is clipped.
hidden → const LayoutOverflow
Content scrolls and is clipped.
hiddenReverse → const LayoutOverflow
Content scrolls and is clipped, with reversed scroll direction.
scroll → const LayoutOverflow
Content scrolls but is not clipped.
scrollReverse → const LayoutOverflow
Content scrolls but is not clipped, with reversed scroll direction.
visible → const LayoutOverflow
Content does not scroll and is not clipped.