|
|
@ -30,11 +30,14 @@ dependencies:
|
|
|
|
- Provide drawer icon animation
|
|
|
|
- Provide drawer icon animation
|
|
|
|
- Provide shadow of Main screen with customization of shadow colors,blurRadius and spreadRadius
|
|
|
|
- Provide shadow of Main screen with customization of shadow colors,blurRadius and spreadRadius
|
|
|
|
- Provide RTL(RightToLeft),LTR(LeftToRight) and TTB(TopToBottom) slider open selection
|
|
|
|
- Provide RTL(RightToLeft),LTR(LeftToRight) and TTB(TopToBottom) slider open selection
|
|
|
|
|
|
|
|
- Provide Custom Appbar support and you can also use plugin appBar with use of `SliderAppBar` widget
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Code
|
|
|
|
# Code
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
```
|
|
|
|
Scaffold(
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
|
|
|
return Scaffold(
|
|
|
|
body: SliderDrawer(
|
|
|
|
body: SliderDrawer(
|
|
|
|
key: _key,
|
|
|
|
key: _key,
|
|
|
|
appBar: SliderAppBar(
|
|
|
|
appBar: SliderAppBar(
|
|
|
@ -44,7 +47,8 @@ dependencies:
|
|
|
|
fontSize: 22, fontWeight: FontWeight.w700))),
|
|
|
|
fontSize: 22, fontWeight: FontWeight.w700))),
|
|
|
|
slider: Container(color: Colors.red),
|
|
|
|
slider: Container(color: Colors.red),
|
|
|
|
child: Container(color: Colors.amber),
|
|
|
|
child: Container(color: Colors.amber),
|
|
|
|
))
|
|
|
|
));
|
|
|
|
|
|
|
|
}
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
</br>
|
|
|
|
</br>
|
|
|
@ -58,7 +62,8 @@ dependencies:
|
|
|
|
|
|
|
|
|
|
|
|
![slider_document](slider_d_2.png)
|
|
|
|
![slider_document](slider_d_2.png)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</br>
|
|
|
|
|
|
|
|
</br>
|
|
|
|
# Slider open
|
|
|
|
# Slider open
|
|
|
|
|
|
|
|
|
|
|
|
| SliderOpen.LEFT_TO_RIGHT | SliderOpen.RIGHT_TO_LEFT | SliderOpen.TOP_TO_BOTTOM |
|
|
|
|
| SliderOpen.LEFT_TO_RIGHT | SliderOpen.RIGHT_TO_LEFT | SliderOpen.TOP_TO_BOTTOM |
|
|
|
@ -67,12 +72,13 @@ dependencies:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</br>
|
|
|
|
|
|
|
|
|
|
|
|
### Controlling the drawer
|
|
|
|
### Controlling the drawer
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
```
|
|
|
|
GlobalKey<SliderDrawerState> _key =
|
|
|
|
class _MyAppState extends State<MyApp> {
|
|
|
|
new GlobalKey<SliderDrawerState>();
|
|
|
|
GlobalKey<SliderDrawerState> _key = GlobalKey<SliderDrawerState>();
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
@ -81,12 +87,14 @@ GlobalKey<SliderDrawerState> _key =
|
|
|
|
key: _key,
|
|
|
|
key: _key,
|
|
|
|
appBar: SliderAppBar(
|
|
|
|
appBar: SliderAppBar(
|
|
|
|
appBarColor: Colors.white,
|
|
|
|
appBarColor: Colors.white,
|
|
|
|
title: Text(title,
|
|
|
|
title: Text('Title',
|
|
|
|
style: const TextStyle(
|
|
|
|
style:
|
|
|
|
fontSize: 22, fontWeight: FontWeight.w700))),
|
|
|
|
const TextStyle(fontSize: 22, fontWeight: FontWeight.w700))),
|
|
|
|
slider: Container(color: Colors.red),
|
|
|
|
slider: Container(color: Colors.red),
|
|
|
|
child: Container(color: Colors.amber),
|
|
|
|
child: Container(color: Colors.amber),
|
|
|
|
)),
|
|
|
|
));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|