A material design floating action button.
A floating action button is a circular icon button that hovers over content to promote a primary action in the application. Floating action buttons are most commonly used in the floatingActionButton field.
Use at most a single floating action button per screen. Floating action buttons should be used for positive actions such as "create", "share", or "navigate".
If the onPressed callback is not specified or null, then the button will be disabled and will not react to touch.
See also:
- Inheritance
- Object
- Widget
- StatefulWidget
- FloatingActionButton
Constructors
- FloatingActionButton({Key key, @required Widget child, String tooltip, Color backgroundColor, Object heroTag, int elevation: 6, int highlightElevation: 12, @required VoidCallback onPressed, bool mini: false })
-
Creates a floating action button.
const
Properties
- backgroundColor → Color
-
The color to use when filling the button.
read-only - child → Widget
-
The widget below this widget in the tree.
read-only - elevation → int
-
The z-coordinate at which to place this button.
read-only - heroTag → Object
-
The tag to apply to the button's Hero widget.
read-only - highlightElevation → int
-
The z-coordinate at which to place this button when the user is touching the button.
read-only - mini → bool
-
Controls the size of this button.
read-only - onPressed → VoidCallback
-
The callback that is called when the button is tapped or otherwise activated.
read-only - tooltip → String
-
Text that describes the action that will occur when the button is pressed.
read-only - hashCode → int
-
Get a hash code for this object.
read-only, inherited - key → Key
-
Controls how one widget replaces another widget in the tree.
read-only, inherited - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Operators
-
operator ==(
other) → bool -
The equality operator.
inherited
Methods
-
createState(
) → _FloatingActionButtonState -
Creates the mutable state for this widget at a given location in the tree.
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited -
debugFillDescription(
List<String> description) → void -
Add additional information to the given description for use by toString.
inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited -
toString(
) → String -
Returns a string representation of this object.
inherited -
toStringShort(
) → String -
A short, textual description of this widget.
inherited