material_speed_dial

Creator: coderz1093

Last updated:

Add to Cart

Description:

material speed dial

material_speed_dial #
A simple Material speed dial.
Preview #

Usage #

Add to your dependencies

dependencies:
material_speed_dial: 0.0.7
copied to clipboard

Add to your widget tree

class MyHomePage extends StatelessWidget {
final _key = GlobalKey<SpeedDialState>();

@override
Widget build(BuildContext context) {
return Scaffold(
floatingActionButton: SpeedDial(
key: _key,
invokeAfterClosing: true,
child: Icon(Icons.add),
expandedChild: Icon(Icons.share),
backgroundColor: Colors.blue,
expandedBackgroundColor: Colors.black,
children: [
SpeedDialChild(
child: Icon(Icons.close),
label: Text('Test'),
onPressed: () {},
),
SpeedDialChild(
child: Icon(Icons.pending),
label: Text('Another Test'),
onPressed: () {},
),
],
),
);
}
}
copied to clipboard

Check for state or toggle

final isOpen = _key.currentState.isOpen;
copied to clipboard
_key.currentState.toggle();
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files:

Customer Reviews

There are no reviews.