-Refactor code

master
nikhil-concetto 5 years ago
parent f662c2f1d7
commit 236d6cfaf0

@ -51,7 +51,6 @@ class SliderMenuContainerState extends State<SliderMenuContainer>
double _slideBarYOffset = 0; double _slideBarYOffset = 0;
bool _isSlideBarOpen = false; bool _isSlideBarOpen = false;
AnimationController _animationController; AnimationController _animationController;
double _pageScale = 1;
Widget drawerIcon; Widget drawerIcon;
double db = 0; double db = 0;
@ -68,7 +67,6 @@ class SliderMenuContainerState extends State<SliderMenuContainer>
? widget.sliderMenuOpenOffset ? widget.sliderMenuOpenOffset
: widget.sliderMenuCloseOffset; : widget.sliderMenuCloseOffset;
// _slideBarYOffset = _isSlideBarOpen ? widget.sliderMainOffset : 0; // _slideBarYOffset = _isSlideBarOpen ? widget.sliderMainOffset : 0;
_pageScale = _isSlideBarOpen ? 0.8 : 1;
}); });
} }
@ -77,8 +75,7 @@ class SliderMenuContainerState extends State<SliderMenuContainer>
_animationController.forward(); _animationController.forward();
_slideBarXOffset = widget.sliderMenuOpenOffset; _slideBarXOffset = widget.sliderMenuOpenOffset;
// _slideBarYOffset = widget.sliderMainOffset; // _slideBarYOffset = widget.sliderMainOffset;
_pageScale = 0.8; });
});
} }
void closeDrawer() { void closeDrawer() {
@ -86,7 +83,6 @@ class SliderMenuContainerState extends State<SliderMenuContainer>
_animationController.reverse(); _animationController.reverse();
_slideBarXOffset = widget.sliderMenuCloseOffset; _slideBarXOffset = widget.sliderMenuCloseOffset;
_slideBarYOffset = 0; _slideBarYOffset = 0;
_pageScale = 1;
}); });
} }

@ -1,5 +1,5 @@
name: flutter_slider_drawer name: flutter_slider_drawer
description: A new Flutter package. description: A Flutter package with custom implementation of the Sider Drawer Menu
version: 1.0.0 version: 1.0.0
homepage: https://github.com/NikhilVadoliya/Flutter_slider_drawer homepage: https://github.com/NikhilVadoliya/Flutter_slider_drawer

Loading…
Cancel
Save