Fix leaking animation in floating action button. (#3575)

This commit is contained in:
Ian Hickson
2016-04-27 12:30:48 -07:00
committed by Adam Barth
parent 0f1dbe09af
commit 256adfcd46
3 changed files with 17 additions and 8 deletions

View File

@@ -20,10 +20,6 @@ void main() {
tester.setLocale("es", "US");
tester.pump();
expect(tester, hasWidget(find.text('MERCADO')));
// TODO(abarth): We're leaking an animation. We should track down the leak
// and plug it rather than waiting for the animation to end here.
tester.pump(const Duration(seconds: 1));
});
});
}

View File

@@ -109,6 +109,12 @@ class _FloatingActionButtonState extends State<FloatingActionButton> {
));
}
@override
void dispose() {
_childSegueController.dispose();
super.dispose();
}
@override
void didUpdateConfig(FloatingActionButton oldConfig) {
super.didUpdateConfig(oldConfig);

View File

@@ -250,10 +250,17 @@ abstract class SchedulerBinding extends BindingBase {
exception: reason,
library: 'scheduler library',
informationCollector: (StringBuffer information) {
information.writeln(
'There ${ transientCallbackCount == 1 ? "was one transient callback" : "were $transientCallbackCount transient callbacks" } '
'left. The stack traces for when they were registered are as follows:'
);
if (transientCallbackCount == 1) {
information.writeln(
'There was one transient callback left. '
'The stack traces for when it was registered is as follows:'
);
} else {
information.writeln(
'There were $transientCallbackCount transient callbacks left. '
'The stack traces for when they were registered are as follows:'
);
}
for (int id in _transientCallbacks.keys) {
_FrameCallbackEntry entry = _transientCallbacks[id];
information.writeln('-- callback $id --');