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