Turn off AnimationControllers when not in use (#5902)
This requires all AnimationController objects to be given a TickerProvider, a class that can create the Ticker. It also provides some nice mixins for people who want to have their State provide a TickerProvider. And a schedulerTickerProvider for those cases where you just want to see your battery burn. Also, we now enforce destruction order for elements.
This commit is contained in:
@@ -73,7 +73,10 @@ void main() {
|
||||
await tester.pumpWidget(new Text('foo'));
|
||||
int count;
|
||||
|
||||
AnimationController test = new AnimationController(duration: const Duration(milliseconds: 5100));
|
||||
AnimationController test = new AnimationController(
|
||||
duration: const Duration(milliseconds: 5100),
|
||||
vsync: tester,
|
||||
);
|
||||
count = await tester.pumpUntilNoTransientCallbacks(const Duration(seconds: 1));
|
||||
expect(count, 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user