Skip to content

Commit

Permalink
Merge pull request #23 from alex-melnyk/quickfix/animation_after_dispose
Browse files Browse the repository at this point in the history
Animation after widget disposed fixed.
  • Loading branch information
alex-melnyk authored Oct 14, 2021
2 parents 570403e + c5d4d4f commit 3d02980
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.2.4

* Animation after dispose fixed.

## 1.2.3+1

* Disabling gestures fixed.
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.2.3+1"
version: "1.2.4"
meta:
dependency: transitive
description:
Expand Down
13 changes: 7 additions & 6 deletions lib/src/widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ class AdvancedDrawer extends StatefulWidget {

class _AdvancedDrawerState extends State<AdvancedDrawer>
with SingleTickerProviderStateMixin {
late AdvancedDrawerController _controller;
late AnimationController _animationController;
late Animation<double> _drawerScaleAnimation;
late Animation<Offset> _childSlideAnimation;
late Animation<double> _childScaleAnimation;
late Animation<Decoration> _childDecorationAnimation;
late final AdvancedDrawerController _controller;
late final AnimationController _animationController;
late final Animation<double> _drawerScaleAnimation;
late final Animation<Offset> _childSlideAnimation;
late final Animation<double> _childScaleAnimation;
late final Animation<Decoration> _childDecorationAnimation;
late double _offsetValue;
late Offset _freshPosition;
Offset? _startPosition;
Expand Down Expand Up @@ -258,6 +258,7 @@ class _AdvancedDrawerState extends State<AdvancedDrawer>

@override
void dispose() {
_controller.removeListener(handleControllerChanged);
_animationController.dispose();

if (widget.controller == null) {
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_advanced_drawer
description: An advanced drawer widget, that can be fully customized with size, text, color, radius of corners.
version: 1.2.3+1
version: 1.2.4
homepage: https://github.com/alex-melnyk/flutter_advanced_drawer
repository: https://github.com/alex-melnyk/flutter_advanced_drawer
issue_tracker: https://github.com/alex-melnyk/flutter_advanced_drawer/issues
Expand Down

0 comments on commit 3d02980

Please sign in to comment.