Skip to content
pubscout

vsync_provider

0.6.0, released 9 days ago by mono0926.com

Provides a vsync ticker for AnimationController compatible with the provider package.

WASM-ready
$ flutter pub add vsync_provider
Source repository

What it does

VsyncProvider bridges the provider ecosystem with AnimationControllers by supplying the required vsync ticker. This allows widgets to easily handle animations without managing TickerProviderStateMixin manually.

AI-written summary of version 0.6.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are using the provider package for state management and need a vsync for AnimationControllers
  • You want to avoid using TickerProviderStateMixin in your StatefulWidgets

Skip it when

  • You are not using the provider package
  • you are using an alternative state management solution like Riverpod or Bloc

Strengths

  • Simplifies animation controller creation with provider
  • Eliminates the need for TickerProviderStateMixin in many cases

Weaknesses

  • Tied directly to the provider package ecosystem

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1

not documented

VsyncProvider(
  builder: (context, vsync) => AnimationController(
    vsync: vsync,
    duration: const Duration(seconds: 1),
  ),
)

Works with

Packages commonly used together with vsync_provider: ones it builds on, ones built on it, and its own family.