flutter_fab_dialer 0.0.4 copy "flutter_fab_dialer: ^0.0.4" to clipboard
flutter_fab_dialer: ^0.0.4 copied to clipboard

outdated

A new flutter package project.

Introduction #

This is a Widget build for having an alternative to default menus

alt text

There are two types of fab menu items

One with text associated

   FabMiniMenuItem.withText(
       new Icon(Icons.add),
       Colors.blue,
       4.0,
       "Button menu",
       yourFunction,
       "Click me",
       Colors.blue,
       Colors.white,
      )

The other one without text

  FabMiniMenuItem.noText(
        new Icon(Icons.add),
        Colors.blue,
        4.0,
        "Button menu",
        yourFunction,
      )

Usage #

Create a list with your desired elements and customize each one #

 var _fabMiniMenuItemList = [
   new FabMiniMenuItem.withText(
       new Icon(Icons.add),
       Colors.blue,
       4.0,
       "Button menu 1",
     yourFunction1,
       "Click me",
       Colors.blue,
       Colors.white,
      ),
    new FabMiniMenuItem.noText(
      new Icon(Icons.add),
      Colors.blue,
      4.0,
      "Button menu 2",
      yourFunction2,
    )
    ];

Add the Dialer to your UI #


class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    //The list of FabMiniMenuItems that we are going to use
    var _fabMiniMenuItemList = [
   new FabMiniMenuItem.withText(
       new Icon(Icons.add),
       Colors.blue,
       4.0,
       "Button menu",
     _incrementCounter,
       "Click me",
       Colors.blue,
       Colors.white,
      ),
    new FabMiniMenuItem.noText(
      new Icon(Icons.add),
      Colors.blue,
      4.0,
      "Button menu",
      _incrementCounter,
    )
    ];
    
    return new Scaffold(
      appBar: new AppBar(
        title: new Text(widget.title),
      ),
      //Using a Stack will assure that the Dialer will appear at the end of your layout
      body:  new Stack(
          children: <Widget>[
            new Center(
              child: new Column(
                children: <Widget>[
                  new Text('You have pushed the button this many times:'),
                  new Text('$_counter', style: Theme.of(context).textTheme.display1),
                ],
              ),
            ),
            new FabDialer(_fabMiniMenuItemList, Colors.blue, new Icon(Icons.add)),
          ],
        ),
    );
  }
}
18
likes
0
pub points
64%
popularity

Publisher

unverified uploader

A new flutter package project.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_fab_dialer