Skip to content

Commit 9cf3b20

Browse files
Dispose of animation controller in shared y axis demo (flutter#259)
1 parent 634ffb4 commit 9cf3b20

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

lib/codeviewer/code_segments.dart

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31560,6 +31560,25 @@ class CodeSegments {
3156031560
TextSpan(style: codeStyle.baseStyle, text: '\u000a\u000a '),
3156131561
TextSpan(style: codeStyle.keywordStyle, text: '@override'),
3156231562
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
31563+
TextSpan(style: codeStyle.keywordStyle, text: 'void'),
31564+
TextSpan(style: codeStyle.baseStyle, text: ' dispose'),
31565+
TextSpan(style: codeStyle.punctuationStyle, text: '()'),
31566+
TextSpan(style: codeStyle.baseStyle, text: ' '),
31567+
TextSpan(style: codeStyle.punctuationStyle, text: '{'),
31568+
TextSpan(style: codeStyle.baseStyle, text: '\u000a _controller'),
31569+
TextSpan(style: codeStyle.punctuationStyle, text: '.'),
31570+
TextSpan(style: codeStyle.baseStyle, text: 'dispose'),
31571+
TextSpan(style: codeStyle.punctuationStyle, text: '();'),
31572+
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
31573+
TextSpan(style: codeStyle.keywordStyle, text: 'super'),
31574+
TextSpan(style: codeStyle.punctuationStyle, text: '.'),
31575+
TextSpan(style: codeStyle.baseStyle, text: 'dispose'),
31576+
TextSpan(style: codeStyle.punctuationStyle, text: '();'),
31577+
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
31578+
TextSpan(style: codeStyle.punctuationStyle, text: '}'),
31579+
TextSpan(style: codeStyle.baseStyle, text: '\u000a\u000a '),
31580+
TextSpan(style: codeStyle.keywordStyle, text: '@override'),
31581+
TextSpan(style: codeStyle.baseStyle, text: '\u000a '),
3156331582
TextSpan(style: codeStyle.classStyle, text: 'Widget'),
3156431583
TextSpan(style: codeStyle.baseStyle, text: ' build'),
3156531584
TextSpan(style: codeStyle.punctuationStyle, text: '('),

lib/demos/reference/motion_demo_shared_y_axis_transition.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ class _SharedYAxisTransitionDemoState extends State<SharedYAxisTransitionDemo>
5656
'J',
5757
];
5858

59+
@override
60+
void dispose() {
61+
_controller.dispose();
62+
super.dispose();
63+
}
64+
5965
@override
6066
Widget build(BuildContext context) {
6167
final localizations = GalleryLocalizations.of(context);

0 commit comments

Comments
 (0)