• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2016 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5import 'package:flutter/scheduler.dart';
6
7/// A [TickerProvider] that creates a standalone ticker.
8///
9/// Useful in tests that create an [AnimationController] outside of the widget
10/// tree.
11class 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}
18