flutter_speed_dial 6.0.0 flutter_speed_dial: ^6.0.0 copied to clipboard
Flutter plugin to implement a beautiful and dynamic Material Design Speed Dial with labels, animated icons, multi-directional children and much more.
Flutter Speed Dial
Flutter package to render a Material Design Speed Dial.
The SpeedDial widget is built to be placed in the
Scaffold.floatingActionButton argument, replacing the
You can set its position using
It can also be used with
Null safety is available from version 3.0.5 ( It is also backward compatible, meaning you can use it with non null safe code too )
SpeedDial can take any Widget as
label SpeedDial will use Extended FloatingActionButton property if label is specified. It also have
activeLabel property by which you can specify the label which is shown when SpeedDial is open. It also comes with its labelTransitionBuilder which defaults to fade transition.
Also Every child's button have
label property which accepts
String which can be styled by using
labelStyle. If you want to specify a widget then you can use labelWidget.
label parameter is not provided, then the label will be not rendered.
Types of child for SpeedDial (Ordered by their priority)
Animated Icon using
SpeedDial's AnimatedIcon has two specific parameters:
SpeedDial's Widget has two specific parameters:
childtakes a widget and is the default placeholder if dial is not open.
activeChildtakes a widget and is the child's Widget which is used when dial is open, not required.
SpeedDial's IconData has three specific parameters:
IconDataand is the default placeholder if dial is not open.
IconDataand is the child's IconData which is used when dial is open, not required.
IconThemeDatawhich includes color and size.
The package will handle the animation by itself.
There are various properties for SpeedDial by which you can adjust the spacing:
spacing- This parameter handles the space b/w speed dial and its children.
spaceBetweenChildren- As the name suggests, this is used to adjust the space b/w every child element
childPadding- This will adjust the padding of children speed dial button, this will help you to control the size of the children button more effectively.
childMargin- This will help you to adjust the margin b/w children speed dial button and its label.
Close on WillPop
Closes automatically on back button press, if dial is open.
If you don't want this behaviour then simply change the value of
closeDialOnPop to false.
How to use
- Create a value notifier named
ValueNotifier<bool> isDialOpen = ValueNotifier(false);
- Then set
SpeedDial( ... openCloseDial: isDialOpen, ... )
- Now you can change the state of dial open:
isDialOpen.value = false;
See Example Code for more info.
Issues & Feedback #
Every pull request is welcome.