Skip to content

Commit 8d5adc8

Browse files
Merge pull request #6 from douglasramos/patch-1
Correct dispose of flutter switch widget
2 parents 6195f64 + 974c4e3 commit 8d5adc8

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

lib/flutter_switch.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ class _FlutterSwitchState extends State<FlutterSwitch>
5656
CurvedAnimation(parent: _animationController, curve: Curves.linear),
5757
);
5858
}
59+
60+
@override
61+
void dispose() {
62+
_animationController.dispose();
63+
super.dispose();
64+
}
5965

6066
@override
6167
Widget build(BuildContext context) {

0 commit comments

Comments
 (0)