Skip to content

Commit

Permalink
Merge pull request alex-melnyk#57 from amrogad/master
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-melnyk authored Jan 3, 2025
2 parents 581f676 + ec64b21 commit 8aa024f
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions lib/src/widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,10 @@ class _AdvancedDrawerState extends State<AdvancedDrawer>
}

void _handleControllerChanged() {
// Check if the widget is still mounted
if (context.mounted) {
// If the value of _controller is visible, forward the animation; otherwise, reverse it
_controller.value.visible
? _animationController.forward()
: _animationController.reverse();
}
// If widget is not mounted do nothing
if (!mounted) return;
// If the value of _controller is visible, forward the animation; otherwise, reverse it
_controller.value.visible ? _animationController.forward() : _animationController.reverse();
}

void _handleDragStart(DragStartDetails details) {
Expand Down

0 comments on commit 8aa024f

Please sign in to comment.