LiveFilledButton class abstract
A FilledButton that triggers an action cell when pressed.
Rather than taking an onPressed
callback function, the constructors take an
action cell in the press
argument, which is triggered when the button is
pressed. Similarly, when the button is long-pressed, the action cell
provided in longPress
is triggered, if it is not null.
The enabled
cell controls whether the button can be tapped (true) or not
(false).
MetaCells can be provided for the onHover
and onFocusChange
properties.
The value of the onHover
MetaCell is set to true, while hovering over the
widget and false otherwise. Similarly the value of the onFocusChange
MetaCell
is set to true, while the widget is focussed.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CellWidget
- LiveFilledButton
Constructors
-
LiveFilledButton.new({Key? key, ValueCell<
bool> enabled, ActionCell? press, ActionCell? longPress, MetaCell<bool> ? onHover, MetaCell<bool> ? onFocusChange, ButtonStyle? style, bool autofocus, Clip? clipBehavior, required Widget? child}) -
constfactory
-
LiveFilledButton.icon({Key? key, ValueCell<
bool> enabled, ActionCell? press, ActionCell? longPress, MetaCell<bool> ? onHover, MetaCell<bool> ? onFocusChange, ButtonStyle? style, bool? autofocus, Clip? clipBehavior, Widget? icon, required Widget label, IconAlignment? iconAlignment}) -
constfactory
-
LiveFilledButton.tonal({Key? key, ValueCell<
bool> enabled, ActionCell? press, ActionCell? longPress, MetaCell<bool> ? onHover, MetaCell<bool> ? onFocusChange, ButtonStyle? style, bool autofocus, Clip? clipBehavior, required Widget? child}) -
constfactory
-
LiveFilledButton.tonalIcon({Key? key, ValueCell<
bool> enabled, ActionCell? press, ActionCell? longPress, MetaCell<bool> ? onHover, MetaCell<bool> ? onFocusChange, ButtonStyle? style, bool? autofocus, Clip? clipBehavior, Widget? icon, required Widget label, IconAlignment? iconAlignment}) -
constfactory
Properties
-
enabled
→ ValueCell<
bool> -
Is the button enabled for user input?
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- longPress → ActionCell?
-
ActionCell to trigger when the button is long pressed.
no setterinherited
-
onFocusChange
→ MetaCell<
bool> ? -
MetaCell that is updated whenever the focus state of the button changes.
no setterinherited
-
onHover
→ MetaCell<
bool> ? -
Meta cell that is updated whenever the hover state of the button changes.
no setterinherited
- press → ActionCell?
-
ActionCell to trigger when the button is pressed.
no setterinherited
- restorationId → String?
-
Restoration ID to use for restoring the cell state
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
BuildContext context) → Widget -
Build the widget underneath this widget in the tree
inherited
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< CellWidget> -
Creates the mutable state for this widget at a given location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited