Skip to content

Latest commit

History

History
68 lines (54 loc) 路 2.19 KB

File metadata and controls

68 lines (54 loc) 路 2.19 KB

Expendable Fab Menu

Pub Pull Requests are welcome Codemagic build status Null safety

A flutter expendable simple FAB Floating Action Button menu

Showcase

Installation

Just add expendable_fab to your pubspec.yml file

dependencies:
  expendable_fab: ^0.0.1

Example

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Placeholder(),
        floatingActionButton: ExpendableFab(
          icon: Icon(Icons.favorite),
          closeIcon: Icon(Icons.close),
          distance: 112.0,
          children: [
            ActionButton(
              onPressed: () => toast(context, 'balance'),
              icon: const Icon(Icons.account_balance),
            ),
            ActionButton(
              onPressed: () => toast(context, 'money'),
              icon: const Icon(Icons.money),
            ),
          ],
        ),
      ),
    );
  }
}

You can check for a more complete example in the example directory.

Customize

You can customize the widget appareance using the following properties:

Property Description Default
distance Sets the widget distance from bottom and right side 112
icon The FAB initial icon Icon(Icons.create)
closeIcon The FAB close icon Icon(Icons.close)

Contributing

Please submit a PR 馃榿, I want to have 1 ) action buttons customization 2 ) button customization 3 ) more animations