Address follow up to https://github.com/flutter/flutter/pull/20354 (#21181)
This commit is contained in:
@@ -128,9 +128,6 @@ abstract class TestWidgetsFlutterBinding extends BindingBase
|
||||
@protected
|
||||
bool get checkIntrinsicSizes => false;
|
||||
|
||||
@override
|
||||
bool disableAnimations = false;
|
||||
|
||||
/// Creates and initializes the binding. This function is
|
||||
/// idempotent; calling it a second time will just return the
|
||||
/// previously-created instance.
|
||||
|
||||
@@ -10,8 +10,16 @@ import 'package:flutter/scheduler.dart';
|
||||
/// tree.
|
||||
class TestVSync implements TickerProvider {
|
||||
/// Creates a ticker provider that creates standalone tickers.
|
||||
const TestVSync();
|
||||
const TestVSync({this.disableAnimations = false});
|
||||
|
||||
/// Whether to disable the animations of tickers create from this picker.
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * [AccessibilityFeatures.disableAnimations], for the setting that controls this flag.
|
||||
/// * [AnimationBehavior], for how animation controllers change when created from tickers with this flag.
|
||||
final bool disableAnimations;
|
||||
|
||||
@override
|
||||
Ticker createTicker(TickerCallback onTick) => new Ticker(onTick);
|
||||
Ticker createTicker(TickerCallback onTick) => new Ticker(onTick)..disableAnimations = disableAnimations;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user