vsync_provider 0.4.0 copy "vsync_provider: ^0.4.0" to clipboard
vsync_provider: ^0.4.0 copied to clipboard

outdated

VsyncProvider provides vsync for AnimationController. This works with provider package.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'pages/single_ticker_page.dart';
import 'pages/ticker_page.dart';

void main() => runApp(const App());

class App extends StatelessWidget {
  const App({Key key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: const _HomePage(),
      routes: {
        SingleTickerPage.routeName: (context) => SingleTickerPage.withModel(),
        TickerPage.routeName: (context) => TickerPage.withModel(),
      },
    );
  }
}

class _HomePage extends StatelessWidget {
  const _HomePage({Key key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('VsyncProvider'),
      ),
      body: ListView(
        children: [
          ListTile(
            title: const Text('SingleTicker'),
            trailing: Icon(Icons.chevron_right),
            onTap: () =>
                Navigator.of(context).pushNamed(SingleTickerPage.routeName),
          ),
          ListTile(
            title: const Text('Ticker'),
            trailing: Icon(Icons.chevron_right),
            onTap: () => Navigator.of(context).pushNamed(TickerPage.routeName),
          )
        ],
      ),
    );
  }
}
10
likes
0
pub points
82%
popularity

Publisher

verified publishermono0926.com

VsyncProvider provides vsync for AnimationController. This works with provider package.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, provider

More

Packages that depend on vsync_provider