flutter boom menu
flutter plugin to implement a boom menu, with icons, title, subtitle, animated fab icons and hide on scrolling.
usage for boom menu
the boommenu widget is built to be placed in the scaffold.floatingactionbutton
argument, replacing the floatingactionbutton
widget.
it’s not possible to set its position with the scaffold.floatingactionbuttonlocation
argument, but it’s possible to set right/bottom margin with the marginright
and marginbottom
arguments (default to 16) to place the button anywhere in the screen.
using the scaffold.bottomnavigationbar
the floating button will be always placed above the bar, so the bottomappbar.hasnotch
should be always false
.
title
every child button can have a icon
,title
, subtitle
which can be customized providing by yourself. if the title
parameter is not provided the title will be not rendered.
the package will handle the animation by itself.
example usage ( complete with all params ):
widget build(buildcontext context) {
return scaffold(
floatingactionbutton: boommenu(
animatedicon: animatedicons.menu_close,
animatedicontheme: iconthemedata(size: 22.0),
//child: icon(icons.add),
onopen: () => print('opening dial'),
onclose: () => print('dial closed'),
scrollvisible: scrollvisible,
overlaycolor: colors.black,
overlayopacity: 0.7,
children: [
menuitem(
child: icon(icons.accessibility, color: colors.black),
title: "profiles",
titlecolor: colors.white,
subtitle: "you can view the noel profile",
subtitlecolor: colors.white,
backgroundcolor: colors.deeporange,
ontap: () => print('first child'),
),
menuitem(
child: icon(icons.brush, color: colors.black),
title: "profiles",
titlecolor: colors.white,
subtitle: "you can view the noel profile",
subtitlecolor: colors.white,
backgroundcolor: colors.green,
ontap: () => print('second child'),
),
menuitem(
child: icon(icons.keyboard_voice, color: colors.black),
title: "profile",
titlecolor: colors.white,
subtitle: "you can view the noel profile",
subtitlecolor: colors.white,
backgroundcolor: colors.blue,
ontap: () => print('third child'),
),
menuitem(
child: icon(icons.ac_unit, color: colors.black),
title: "profiles",
titlecolor: colors.white,
subtitle: "you can view the noel profile",
subtitlecolor: colors.white,
backgroundcolor: colors.blue,
ontap: () => print('fourth child'),
)
],
),
);
}
issues & feedback
please file an issue to send feedback or report a bug. thank you!
Comments are closed.