From fb6eefe32cf1a2956372fe7620c12fff23a5a7a3 Mon Sep 17 00:00:00 2001 From: NikhilVadoliya Date: Thu, 27 Jan 2022 20:11:01 +0530 Subject: [PATCH] Release 2.1.1 --- CHANGELOG.md | 10 ++++--- README.md | 66 +++++++++++++++++++++++++-------------------- lib/src/slider.dart | 26 +++++++++--------- pubspec.yaml | 2 +- 4 files changed, 57 insertions(+), 47 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dac3fe5..9cbab63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 @@ -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 diff --git a/README.md b/README.md index c9df563..4c41d32 100644 --- a/README.md +++ b/README.md @@ -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), + )); + } ```
@@ -58,7 +62,8 @@ dependencies: ![slider_document](slider_d_2.png) - +
+
# Slider open | SliderOpen.LEFT_TO_RIGHT | SliderOpen.RIGHT_TO_LEFT | SliderOpen.TOP_TO_BOTTOM | @@ -67,26 +72,29 @@ dependencies: - +
+ ### Controlling the drawer ``` -GlobalKey _key = - new GlobalKey(); - - @override +class _MyAppState extends State { + GlobalKey _key = GlobalKey(); + + @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), + )); + } +} ``` diff --git a/lib/src/slider.dart b/lib/src/slider.dart index 0fd17d3..a98e8f1 100644 --- a/lib/src/slider.dart +++ b/lib/src/slider.dart @@ -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(); diff --git a/pubspec.yaml b/pubspec.yaml index 7dabc76..3c11a2f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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: