FloatyActionButton class
A model class for customizing a floating action button within a navigation bar.
The FloatyActionButton allows you to specify a widget, action (onTap), size, background color, and foreground color for a floating action button.
Constructors
- FloatyActionButton({required Widget icon, required VoidCallback onTap, double? size = 50, Color? backgroundColor, Color? foregroundColor, Object? heroTag, String? tooltip, Color? focusColor, Color? hoverColor, Color? splashColor, MouseCursor? mouseCursor, bool mini = false, ShapeBorder? shape, Clip clipBehavior = Clip.none, bool isExtended = false, FocusNode? focusNode, bool autofocus = false, MaterialTapTargetSize? materialTapTargetSize, bool? enableFeedback, double? extendedIconLabelSpacing, EdgeInsetsGeometry? extendedPadding, TextStyle? extendedTextStyle})
- Creates a FloatyActionButton with the given widget, onTap, and optional customization options for size, background color, and foreground color.
Properties
- autofocus → bool
-
True if this widget will be selected as the initial focus when no other
node in its scope is currently focused.
final
- backgroundColor → Color?
-
The background color of the floating action button.
final
- clipBehavior → Clip
-
The content will be clipped (or not) according to this option.
final
- enableFeedback → bool?
-
Whether detected gestures should provide acoustic and/or haptic feedback.
final
- extendedIconLabelSpacing → double?
-
The spacing between the icon and the label for an extended
FloatingActionButton.
final
- extendedPadding → EdgeInsetsGeometry?
-
The padding for an extended FloatingActionButton's content.
final
- extendedTextStyle → TextStyle?
-
The text style for an extended FloatingActionButton's label.
final
- focusColor → Color?
-
The color to use for filling the button when the button has input focus.
final
- focusNode → FocusNode?
-
An optional focus node to use as the focus node for this widget.
final
- foregroundColor → Color?
-
The foreground color of the floating action button widget.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- heroTag → Object?
-
The tag to apply to the button's Hero widget.
final
- hoverColor → Color?
-
The color to use for filling the button when the button has a pointer
hovering over it.
final
- icon → Widget
-
The widget displayed inside the floating action button.
final
- isExtended → bool
-
True if this is an "extended" floating action button.
final
- materialTapTargetSize → MaterialTapTargetSize?
-
Configures the minimum size of the tap target.
final
- mini → bool
-
Controls the size of this button.
final
- mouseCursor → MouseCursor?
-
The cursor for a mouse pointer when it enters or is hovering over the
button.
final
- onTap → VoidCallback
-
The callback function that is invoked when the button is pressed.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shape → ShapeBorder?
-
The shape of the button's Material.
final
- size → double?
-
The size of the floating action button.
final
- splashColor → Color?
-
The splash color for this FloatingActionButton's InkWell.
final
- tooltip → String?
-
Text that describes the action that will occur when the button is pressed.
final
Methods
-
copyWith(
{Widget? icon, VoidCallback? onTap, double? size, Color? backgroundColor, Color? foregroundColor, Object? heroTag, String? tooltip, Color? focusColor, Color? hoverColor, Color? splashColor, MouseCursor? mouseCursor, bool? mini, ShapeBorder? shape, Clip? clipBehavior, bool? isExtended, FocusNode? focusNode, bool? autofocus, MaterialTapTargetSize? materialTapTargetSize, bool? enableFeedback, double? extendedIconLabelSpacing, EdgeInsetsGeometry? extendedPadding, TextStyle? extendedTextStyle}) → FloatyActionButton - Returns a copy of this FloatyActionButton with the option to modify any of the properties.
-
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