Skip to content
pubscout

funvas

0.1.8, released 3 years ago by creativemaybeno.dev

Create canvas animations based on time and math functions.

WASM-ready
$ flutter pub add funvas
Source repository

What it does

Provides a Funvas class and FunvasContainer widget to render mathematical and time-based canvas animations at 60 frames per second. Inspired by Dwitter, it supplies shorthand functions for sine, cosine, tangent, and color generation.

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

Use it when

  • You want to build custom canvas-based mathematical or procedural animations.
  • You are inspired by Dwitter-style code animations and want to implement them in Flutter.

Skip it when

  • You need pre-compiled vector animations from external designer tools like Rive or Lottie.
  • You require standard UI widget transitions and implicit animations.

Strengths

  • Enables lightweight programmatic animations using math functions and time.
  • Provides convenient shortcuts for trigonometry and color creation inside the animation loop.

Weaknesses

  • Animations must be coded entirely imperatively via canvas draw calls.
  • Not suitable for standard UI state transitions or layout animations.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1
class ExampleFunvas extends Funvas {
  @override
  void u(double t) {
    c.drawCircle(
      Offset(x.width / 2, x.height / 2),
      S(t).abs() * x.height / 4 + 42,
      Paint()..color = R(C(t) * 255, 42, 60 + T(t)),
    );
  }
}

Alternatives

Packages that do the same job and could replace funvas.

  • lottie

    Choose lottie if you want to display pre-made vector animations designed in After Effects instead of writing math and canvas code.

  • flutter_animate

    Choose flutter_animate if you want to declaratively animate standard Flutter widgets with built-in effects rather than drawing on a canvas.

  • rive

    Choose rive if you need interactive, state-driven vector animations for games or complex UI.