FloatButtonLayout class sealed

How a FloatButtonGroup spreads its items when it opens.

A sealed type rather than an enum because the variants do not all carry the same data: a fan has a radius, a sweep and an angle to aim, while a column has none of that. An enum would have to hang those numbers on the group, where they would be silently meaningless for three variants out of five.

FloatButtonGroup(
  layout: const FloatButtonLayout.fan(jitter: 0.2),
  children: [...],
)
Implementers

Constructors

FloatButtonLayout.custom(FloatButtonPlacer place)
Positions of your own.
const
factory
FloatButtonLayout.fan({double? radius, double? sweep, double? start, double jitter, int seed})
An arc swept around the trigger.
const
factory
FloatButtonLayout.grid(int columns, {double? gap})
A block of columns columns, filling the quadrant away from the corner.
const
factory
FloatButtonLayout.horizontal({double? gap})
A row, opening away from the nearer side edge.
const
factory
FloatButtonLayout.vertical({double? gap})
A column. Opens upwards from a group in the lower half of the screen, downwards from one in the upper half.
const
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

labelPlacementFor(int index, int count, Size item, Offset away, double gap) → FloatButtonLabelPlacement
Which side item index's label hangs on under FloatButtonLabelPlacement.auto.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
offsetFor(int index, int count, Size item, Offset away, double gap) → Offset
Where item index of count sits when the group is fully open, measured from the trigger's centre.
toString() → String
A string representation of this object.
inherited

Operators

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