Skip to content

Commit

Permalink
Release 2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
NikhilVadoliya committed Jan 27, 2022
1 parent d89fe3f commit fb6eefe
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 47 deletions.
10 changes: 6 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## [2.1.1] - Release
* Provide custom appBar feature
* Slider LeftToRight and RightToLeft issue fixed


## [2.1.0] - Release
* Code Refactor
* Improve Documentation
Expand All @@ -10,16 +15,13 @@
* replace `sliderMenuOpenSize` and `sliderMenuCloseSize` to `sliderOpenSize` and `sliderCloseSize`
* replace `sliderMenu` and `sliderMain` to `slider` and `child`
* replace `closeDrawer` and `openDrawer` to `closeSlider` and `openSlider`
* replace `SliderMenuContainerState` to `closeSlider`
* replace `SliderMenuContainerState` to `SliderDrawerState`
* replace `hasAppBar` to 'appBar' : if you set `app:null` then it will hide
* replace `isShadow` to 'sliderShadow' : if you set `sliderShadow:null` then shadow will not come
by default it's null






## [2.0.0] - Release

* Added null safety
Expand Down
66 changes: 37 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,26 @@ dependencies:
- Dynamic slider open and close offset
- Provide drawer icon animation
- 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

```
Scaffold(
body: SliderDrawer(
key: _key,
appBar: SliderAppBar(
appBarColor: Colors.white,
title: Text(title,
style: const TextStyle(
fontSize: 22, fontWeight: FontWeight.w700))),
slider: Container(color: Colors.red),
child: Container(color: Colors.amber),
))
Widget build(BuildContext context) {
return Scaffold(
body: SliderDrawer(
key: _key,
appBar: SliderAppBar(
appBarColor: Colors.white,
title: Text(title,
style: const TextStyle(
fontSize: 22, fontWeight: FontWeight.w700))),
slider: Container(color: Colors.red),
child: Container(color: Colors.amber),
));
}
```
</br>
Expand All @@ -58,7 +62,8 @@ dependencies:
![slider_document](slider_d_2.png)

</br>
</br>
# Slider open
| SliderOpen.LEFT_TO_RIGHT | SliderOpen.RIGHT_TO_LEFT | SliderOpen.TOP_TO_BOTTOM |
Expand All @@ -67,26 +72,29 @@ dependencies:

</br>
### Controlling the drawer
```
GlobalKey<SliderDrawerState> _key =
new GlobalKey<SliderDrawerState>();
@override
class _MyAppState extends State<MyApp> {
GlobalKey<SliderDrawerState> _key = GlobalKey<SliderDrawerState>();

@override
Widget build(BuildContext context) {
return Scaffold(
body: SliderDrawer(
key: _key,
appBar: SliderAppBar(
appBarColor: Colors.white,
title: Text(title,
style: const TextStyle(
fontSize: 22, fontWeight: FontWeight.w700))),
slider: Container(color: Colors.red),
child: Container(color: Colors.amber),
)),
return Scaffold(
body: SliderDrawer(
key: _key,
appBar: SliderAppBar(
appBarColor: Colors.white,
title: Text('Title',
style:
const TextStyle(fontSize: 22, fontWeight: FontWeight.w700))),
slider: Container(color: Colors.red),
child: Container(color: Colors.amber),
));
}
}

```
Expand Down
26 changes: 13 additions & 13 deletions lib/src/slider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,19 @@ class SliderDrawer extends StatefulWidget {
///
final SlideDirection slideDirection;

const SliderDrawer({
Key? key,
required this.slider,
required this.child,
this.isDraggable = true,
this.animationDuration = 400,
this.sliderOpenSize = 265,
this.splashColor = Colors.transparent,
this.sliderCloseSize = 0,
this.slideDirection = SlideDirection.LEFT_TO_RIGHT,
this.sliderShadow,
this.appBar = const SliderAppBar(),
}) : super(key: key);
const SliderDrawer(
{Key? key,
required this.slider,
required this.child,
this.isDraggable = true,
this.animationDuration = 400,
this.sliderOpenSize = 265,
this.splashColor = Colors.transparent,
this.sliderCloseSize = 0,
this.slideDirection = SlideDirection.LEFT_TO_RIGHT,
this.sliderShadow,
this.appBar = const SliderAppBar()})
: super(key: key);

@override
SliderDrawerState createState() => SliderDrawerState();
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_slider_drawer
description: A Flutter package with custom implementation of the Slider Drawer Menu
version: 2.1.0
version: 2.1.1
homepage: https://github.com/NikhilVadoliya/Flutter_slider_drawer

environment:
Expand Down

0 comments on commit fb6eefe

Please sign in to comment.