flutter_boom_menu_new 1.0.1 flutter_boom_menu_new: ^1.0.1 copied to clipboard
Flutter plugin to implement a Boom Menu, with icons, title, sub title, animated FAB Icon and hide on scrolling.
Flutter Boom Menu #
Usage #
it is a migration of the duprecated package flutter_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 ):
BoomMenu buildBoomMenu() {
return 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,
elevation: 10,
overlayOpacity: 0.7,
children: [
MenuItemModel(
// child: Icon(Icons.accessibility, color: Colors.black, size: 40,),
child:
Image.asset('assets/logout_icon.png', color: Colors.grey[850]),
title: "Logout",
titleColor: Colors.grey[850]!,
subtitle: "Lorem ipsum dolor sit amet, consectetur",
subTitleColor: Colors.grey[850]!,
backgroundColor: Colors.grey[50]!,
onTap: () => print('THIRD CHILD'),
elevation: 10,
),
MenuItemModel(
child: Image.asset('assets/schemes_icon.png', color: Colors.white),
title: "List",
titleColor: Colors.white,
subtitle: "Lorem ipsum dolor sit amet, consectetur",
subTitleColor: Colors.white,
backgroundColor: Colors.pinkAccent,
onTap: () => print('FOURTH CHILD'),
elevation: 10,
),
MenuItemModel(
child: Image.asset('assets/customers_icon.png',
color: Colors.grey[850]),
title: "Team",
titleColor: Colors.grey[850]!,
subtitle: "Lorem ipsum dolor sit amet, consectetur",
subTitleColor: Colors.grey[850]!,
backgroundColor: Colors.grey[50]!,
onTap: () => print('THIRD CHILD'),
elevation: 10,
),
MenuItemModel(
child: Image.asset('assets/profile_icon.png', color: Colors.white),
title: "Profile",
titleColor: Colors.white,
subtitle: "Lorem ipsum dolor sit amet, consectetur",
subTitleColor: Colors.white,
backgroundColor: Colors.blue,
onTap: () => print('FOURTH CHILD'),
elevation: 10,
)
]);
}
Issues & Feedback #
Please file an issue to send feedback or report a bug. Thank you!
Contributing #
Every pull request is welcome.