forked from firka/flutter
Fix leaking animation in floating action button. (#3575)
This commit is contained in:
@@ -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));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -109,6 +109,12 @@ class _FloatingActionButtonState extends State<FloatingActionButton> {
|
||||
));
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_childSegueController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
void didUpdateConfig(FloatingActionButton oldConfig) {
|
||||
super.didUpdateConfig(oldConfig);
|
||||
|
||||
@@ -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 --');
|
||||
|
||||
Reference in New Issue
Block a user