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,28 +34,23 @@ 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), title: Text(
sliderMenuOpenOffset: 210, title,
appBarHeight: 60, style: TextStyle(fontSize: 22, fontWeight: FontWeight.w700),
title: Text( ),
title, sliderMenu: MenuWidget(
style: TextStyle(fontSize: 22, fontWeight: FontWeight.w700), onItemClick: (title) {
), _key.currentState.closeDrawer();
sliderMenu: MenuWidget( setState(() {
onProfilePictureClick: () {}, this.title = title;
onItemClick: (title) { });
_key.currentState.closeDrawer(); },
),
setState(() { sliderMain: MainWidget()),
this.title = title;
});
},
),
sliderMain: MainWidget()),
), ),
``` ```
@ -79,30 +74,33 @@ GlobalKey<SliderMenuContainerState> _key =
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SliderMenuContainer( return SliderMenuContainer(
appBarColor: Colors.white, appBarColor: Colors.white,
key: _key, key: _key,
sliderMenuWidget: MenuWidget( sliderMenuOpenSize: 200,
onItemClick: (title) { sliderMenu: MenuWidget(
_key.currentState.closeDrawer(); onItemClick: (title) {
setState(() { _key.currentState.closeDrawer();
this.title = title; setState(() {
}); this.title = title;
}, });
), },
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