VooFabConfig class

Configures the floating action button (FAB) shown by the scaffold.

Replaces the four floatingActionButton / floatingActionButtonLocation / floatingActionButtonAnimator / showFloatingActionButton fields on VooNavigationConfig, which were removed in 2.0.

Usage:

VooNavigationConfig(
  ...,
  fab: VooFabConfig(
    widget: FloatingActionButton(onPressed: …, child: Icon(Icons.add)),
    location: FloatingActionButtonLocation.endFloat,
  ),
)

Pass null (the default) for no FAB. Pass VooFabConfig.hidden when you want to suppress a FAB that would otherwise be auto-injected (e.g. by a pageConfig override).

Annotations

Constructors

VooFabConfig({Widget? widget, FloatingActionButtonLocation? location, FloatingActionButtonAnimator? animator, bool visible = true})
const

Properties

animator → FloatingActionButtonAnimator?
Animator controlling how the FAB transitions between locations.
final
hashCode → int
The hash code for this object.
no setterinherited
location → FloatingActionButtonLocation?
Location of the FAB on the scaffold.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
visible → bool
Whether the FAB is visible at all. Set to false to suppress.
final
widget → Widget?
The FAB widget itself. When null, no FAB is rendered.
final

Methods

copyWith({Widget? widget, FloatingActionButtonLocation? location, FloatingActionButtonAnimator? animator, bool? visible}) → VooFabConfig
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

hidden → const VooFabConfig
Convenience: a config that suppresses any FAB (visible = false).