test_vsync.dart 566 Bytes
Newer Older
Ian Hickson's avatar
Ian Hickson committed
1
// Copyright 2014 The Flutter Authors. All rights reserved.
2 3 4 5 6
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter/scheduler.dart';

7 8 9 10
/// A [TickerProvider] that creates a standalone ticker.
///
/// Useful in tests that create an [AnimationController] outside of the widget
/// tree.
11
class TestVSync implements TickerProvider {
12
  /// Creates a ticker provider that creates standalone tickers.
13
  const TestVSync();
14 15

  @override
16
  Ticker createTicker(TickerCallback onTick) => Ticker(onTick);
17
}