Skip to content
pubscout

mesh

0.5.2, released 3 days ago by renan.gg

Fast and customizable animated mesh gradients for Flutter applications.

WASM-ready
$ flutter pub add mesh
Source repository

What it does

Renders free-form mesh gradients using shaders and vertices, allowing developers to create unique visual effects and backgrounds. It supports custom point positions, colors, bezier control points, and animations.

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

Use it when

  • You want to create custom animated mesh gradient backgrounds or UI elements.
  • You need complex free-form gradients that go beyond linear or radial shapes.

Skip it when

  • You are targeting devices or performance limits where high tessellation mesh rendering causes frame drops.
  • You only need simple linear or radial gradients built into Flutter.

Strengths

  • High customizability with vertex-based mesh and bezier control points.
  • Supports intrinsic and controller-driven animations.
  • Uses shaders and vertices for performance.

Weaknesses

  • Complex mesh animations can be performance-heavy if tessellation factors are set too high.
  • Historically had rendering engine compatibility challenges (though fixed in recent versions).

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
4
OMeshGradient(
    mesh: OMeshRect(
        width: 3,
        height: 3,
        vertices: [
            (-0.06, -0.08).v, (0.58, -0.05).v,  (1.36, 0.04).v,
            (-0.02, 0.31).v, (0.44, 0.63).v, (1.11, 0.4).v,
            (-0.01, 1.01).v,  (1.01, 1.0).v,  (1.02, 0.73).v,
        ],
        colors: const [
            Color(0xffa52b68), Color(0xff4693a9), Color(0xff4693a9),
            Color(0xffa52ba0), Color(0xffe8dad4), Color(0xff4693a9),
            Color(0xff9715a9), Color(0xff4693a9), Color(0xff4693a9),
        ],
    ),
);

Alternatives

Packages that do the same job and could replace mesh.

Works with

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