Skip to content

Taskulu/material_speed_dial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Feb 17, 2022
7517549 · Feb 17, 2022

History

5 Commits
Feb 17, 2022
Feb 17, 2022
Feb 17, 2022
Apr 18, 2021
Apr 18, 2021
Feb 17, 2022
Jul 31, 2021
Feb 17, 2022
Feb 17, 2022
Feb 17, 2022
Feb 17, 2022

Repository files navigation

material_speed_dial

A simple Material speed dial.

Preview

Preview

Usage

  1. Add to your dependencies
dependencies:
  material_speed_dial: 0.0.7
  1. 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: () {},
          ),
        ],
      ),
    );
  }
}
  1. Check for state or toggle
final isOpen = _key.currentState.isOpen;
_key.currentState.toggle();