marianocordoba / fab-circular-menu

A Flutter package to create a nice circular menu using a Floating Action Button.
https://pub.dev/packages/fab_circular_menu
MIT License
198 stars 72 forks source link

where is FabCircularMenuController and how can i import that #32

Closed pishguy closed 3 years ago

pishguy commented 3 years ago

could yuu help me how can i do that?

Hey! First of all, thanks for waiting. I've just added a controller property that takes a FabCircularMenuController which allows you to control the menu programatically.

final controller = FabCircularMenuController();

FabCircularMenu(
  child: ...,
  controller: controller,
  options: <Widget>[
    IconButton(icon: Icon(Icons.widgets), onPressed: () {
      controller.isOpen = false;
    }, iconSize: 48.0, color: Colors.white),
    ...
  ],
 )

I will improve documentation and examples soon.

Originally posted by @marianocordoba in https://github.com/marianocordoba/fab-circular-menu/issues/4#issuecomment-596169323

marianocordoba commented 3 years ago

Hi @MahdiPishguy. This has changed and you should use a key with FabCircularMenuState to control the menu programatically. See https://github.com/marianocordoba/fab-circular-menu#handling-the-menu-programmatically