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

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

example/lib/main.dart

import 'package:example/pages/mute_feature_page.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(),
        MuteFeaturePage.routeName: (context) => MuteFeaturePage.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: const Icon(Icons.chevron_right),
            onTap: () =>
                Navigator.of(context).pushNamed(SingleTickerPage.routeName),
          ),
          ListTile(
            title: const Text('Ticker'),
            trailing: const Icon(Icons.chevron_right),
            onTap: () => Navigator.of(context).pushNamed(TickerPage.routeName),
          ),
          ListTile(
            title: const Text('Mute Feature'),
            trailing: const Icon(Icons.chevron_right),
            onTap: () =>
                Navigator.of(context).pushNamed(MuteFeaturePage.routeName),
          )
        ],
      ),
    );
  }
}
10
likes
140
pub points
84%
popularity

Publisher

verified publishermono0926.com

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, provider

More

Packages that depend on vsync_provider