SpeedDial class

Builds the Speed Dial

Inheritance

Constructors

SpeedDial({Key? key, List<SpeedDialChild> children = const [], bool visible = true, Color? backgroundColor, Color? foregroundColor, Color? activeBackgroundColor, Color? activeForegroundColor, Gradient? gradient, BoxShape gradientBoxShape = BoxShape.rectangle, double elevation = 6.0, Size buttonSize = const Size(56.0, 56.0), Size childrenButtonSize = const Size(56.0, 56.0), Widget dialRoot(BuildContext context, bool open, VoidCallback toggleChildren)?, bool mini = false, double overlayOpacity = 0.8, Color? overlayColor, String? tooltip, String? heroTag, AnimatedIconData? animatedIcon, IconThemeData? animatedIconTheme, IconData? icon, IconData? activeIcon, Widget? child, Widget? activeChild, bool switchLabelPosition = false, bool useRotationAnimation = true, double animationAngle = pi / 2, IconThemeData? iconTheme, Widget? label, Widget? activeLabel, Widget labelTransitionBuilder(Widget, Animation<double>)?, AsyncChildrenBuilder? onOpenBuilder, VoidCallback? onOpen, VoidCallback? onClose, SpeedDialDirection direction = SpeedDialDirection.up, bool closeManually = false, bool renderOverlay = true, ShapeBorder shape = const StadiumBorder(), Curve curve = Curves.fastOutSlowIn, VoidCallback? onPress, Duration animationDuration = const Duration(milliseconds: 150), ValueNotifier<bool>? openCloseDial, bool isOpenOnStart = false, bool closeDialOnPop = true, EdgeInsets childMargin = const EdgeInsets.symmetric(horizontal: 16, vertical: 0), EdgeInsets childPadding = const EdgeInsets.symmetric(vertical: 5), double? spaceBetweenChildren, double? spacing, Curve? animationCurve})
const

Properties

activeBackgroundColor Color?
The color of the background of this SpeedDial when it is open
final
activeChild Widget?
This is the active child of the FAB, if specified it will animate b/w this and the child.
final
activeForegroundColor Color?
The color of the foreground of this SpeedDial when it is open
final
activeIcon IconData?
The active icon of the main button, Defaults to icon if not specified, ignored if animatedIcon is non null.
final
activeLabel Widget?
The active label of the main button, Defaults to label if not specified.
final
animatedIcon AnimatedIconData?
The animated icon to show as the main button child. If this is provided the child is ignored.
final
animatedIconTheme IconThemeData?
The theme for the animated icon. This is only applied to animatedIcon.
final
animationAngle double
The angle of the iconRotation
final
animationCurve Curve?
This is the animation of the child of the FAB, if specified it will animate b/w this
final
animationDuration Duration
The duration of the animation or the duration till which animation is played.
final
backgroundColor Color?
The color of the background of this SpeedDial
final
buttonSize Size
The size for this SpeedDial button
final
child Widget?
This is the child of the FAB, if specified it will ignore icon, activeIcon.
final
childMargin EdgeInsets
The margin of each child
final
childPadding EdgeInsets
The padding of each child
final
children List<SpeedDialChild>
Children buttons, from the lowest to the highest.
final
childrenButtonSize Size
The size for this SpeedDial children
final
closeDialOnPop bool
Whether to close the dial on pop if it's open.
final
closeManually bool
If true tapping on speed dial's children will not close the dial anymore.
final
curve Curve
The curve used to animate the button on scrolling.
final
dialRoot Widget Function(BuildContext context, bool open, VoidCallback toggleChildren)?
If Provided then it will replace the default Floating Action Button and will show the Widget Specified as dialRoot instead, it will also ignore backgroundColor, foregroundColor or any other property that was specific to FAB before like onPress, you will have to provide it again to your dialRoot button.
final
direction SpeedDialDirection
The direction of the children. Default is SpeedDialDirection.up
final
elevation double
The intensity of the shadow for this SpeedDial
final
foregroundColor Color?
The color of the foreground of this SpeedDial
final
gradient Gradient?
The gradient decoration for this SpeedDial
final
gradientBoxShape BoxShape
The shape of the gradient decoration for this SpeedDial
final
hashCode int
The hash code for this object.
no setterinherited
heroTag String?
The hero tag used for the fab inside this SpeedDial
final
icon IconData?
The icon of the main button, ignored if animatedIcon is non null.
final
iconTheme IconThemeData?
The theme for the icon generally includes color and size. The iconTheme is only applied to child and activeChild or icon and activeIcon.
final
isOpenOnStart bool
Whether speedDial initialize with open state or not, defaults to false.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label Widget?
The label of the main button.
final
labelTransitionBuilder Widget Function(Widget, Animation<double>)?
Transition Builder between label and activeLabel, defaults to FadeTransition.
final
mini bool
Use mini fab for the speed dial
final
onClose VoidCallback?
Executed when the dial is closed.
final
onOpen VoidCallback?
Executed when the dial is opened.
final
onOpenBuilder AsyncChildrenBuilder?
Repopulate children every time just before opening the dial. If you provide onOpenBuilder then you must also provide a non-const children (e.g. children: []) since children is const by default and cannot be modified.
final
onPress VoidCallback?
Executed when the dial is pressed. If given, the dial only opens on long press!
final
openCloseDial ValueNotifier<bool>?
Open or close the dial via a notification
final
overlayColor Color?
The color of the background overlay.
final
overlayOpacity double
The opacity of the background overlay when the dial is open.
final
renderOverlay bool
If true overlay is rendered.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shape ShapeBorder
The shape of this SpeedDial
final
spaceBetweenChildren double?
Add a space between each children
final
spacing double?
Add a space at between speed dial and children
final
switchLabelPosition bool
final
tooltip String?
The tooltip of this SpeedDial
final
useRotationAnimation bool
If true then rotation animation will be used when animating b/w activeIcon and icon.
final
visible bool
Used to get the button hidden on scroll. See examples for more info.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<StatefulWidget>
Creates the mutable state for this widget at a given location in the tree.
override
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