shiburagi / Drawer-Behavior-Flutter

Drawer behavior is a library that provide an extra behavior on drawer, such as, move view or scaling view's height while drawer on slide.
MIT License
209 stars 36 forks source link

Add property to change Leading Icon in DrawerScaffold() #55

Closed zyllus17 closed 1 year ago

zyllus17 commented 3 years ago

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.

shiburagi commented 3 years ago

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 commented 3 years ago

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