Update README.md

master
NikhilVadoliya 4 years ago committed by GitHub
parent 298a46b22a
commit 79f6993dac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -34,22 +34,17 @@ dependencies:
``` ```
Scaffold( Scaffold(
body: SliderMenuContainer( body:SliderMenuContainer(
appBarColor: Colors.white, appBarColor: Colors.white,
key: _key, key: _key,
sliderOpen: SliderOpen.TOP_TO_BOTTOM, sliderMenuOpenSize: 200,
appBarPadding: const EdgeInsets.only(top: 10),
sliderMenuOpenOffset: 210,
appBarHeight: 60,
title: Text( title: Text(
title, title,
style: TextStyle(fontSize: 22, fontWeight: FontWeight.w700), style: TextStyle(fontSize: 22, fontWeight: FontWeight.w700),
), ),
sliderMenu: MenuWidget( sliderMenu: MenuWidget(
onProfilePictureClick: () {},
onItemClick: (title) { onItemClick: (title) {
_key.currentState.closeDrawer(); _key.currentState.closeDrawer();
setState(() { setState(() {
this.title = title; this.title = title;
}); });
@ -81,7 +76,8 @@ GlobalKey<SliderMenuContainerState> _key =
return SliderMenuContainer( return SliderMenuContainer(
appBarColor: Colors.white, appBarColor: Colors.white,
key: _key, key: _key,
sliderMenuWidget: MenuWidget( sliderMenuOpenSize: 200,
sliderMenu: MenuWidget(
onItemClick: (title) { onItemClick: (title) {
_key.currentState.closeDrawer(); _key.currentState.closeDrawer();
setState(() { setState(() {
@ -89,20 +85,22 @@ GlobalKey<SliderMenuContainerState> _key =
}); });
}, },
), ),
sliderMainWidget: MainWidget()), sliderMain: MainWidget()),
),
``` ```
* Using the below methods for controll drawer. * Using the below methods for controll drawer .
``` ```
_key.currentState.closeDrawer(); _key.currentState.closeDrawer();
_key.currentState.openDrawer(); _key.currentState.openDrawer();
_key.currentState.toggle(); _key.currentState.toggle();
_key.currentState.isDrawerOpen(); _key.currentState.isDrawerOpen();
``` ```
* Use below variable if you want to controlle animation.
``` _key.currentState.animationController```
License License
---- ----

Loading…
Cancel
Save