Sticky class final

Pins the node inside the nearest view that scrolls it, as CSS position: sticky: once its leading edge reaches offset from the view's leading edge it stays there, drawn above the content scrolling under it, until the end of what holds it pushes it on: its parent (the section it heads), or in a data list with sections the section it is in. A list laid out whole in a scrolling column (scrollable: false) is not that view: the column is. ${sticky.stuck} says whether it is pinned now (the node's own bindings and the nodes inside it read it). The design canvas, which doesn't scroll, draws it in place. JSON true, {"offset": 8}, or the offset alone (8, as a bound sticky={on ? 0 : null} gives it); false or null: none.

Annotations
  • @immutable

Constructors

Sticky({double offset = 0})
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
offset → double
Distance from the view's leading edge where it pins, in pixels.
final
props → List<Object?>
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
toJson() → Json
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

fromJson(Object? json) → Sticky?