Drawer-Behavior-Flutter icon indicating copy to clipboard operation
Drawer-Behavior-Flutter copied to clipboard

Add property to change Leading Icon in DrawerScaffold()

Open zyllus17 opened this issue 3 years ago • 2 comments

I want to change the Icon to my desired icon. When I add my desired icon in the leading property in the AppBar, I am not able to figure out what should be in the onPressed to open the side drawer.

If you allow the option to change the icon or tell me what should I put in the onPressed, it would be very helpful.

zyllus17 avatar Jul 31 '21 11:07 zyllus17

you can set AppBar by using appBar prop

final DrawerScaffoldController controller = DrawerScaffoldController();

DrawerScaffold(
    controller: controller,
    appBar: AppBar(
        leading: InkWell(
            onTap: ()=> controller.toggle(),
            child: Icon(Icons.menu),
        ),
    ),
)

more, https://github.com/shiburagi/Drawer-Behavior-Flutter#customize

shiburagi avatar Jul 31 '21 15:07 shiburagi

related issue https://github.com/shiburagi/Drawer-Behavior-Flutter/issues/53

shiburagi avatar Aug 01 '21 14:08 shiburagi