mesh
0.5.2, released 3 days ago by renan.gg
Fast and customizable animated mesh gradients for Flutter applications.
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.
- animated_styled_widget
Serializable CSS-inspired styles with implicit and explicit animations for custom widgets.
79Compare - percentages_with_animation
Animated, customizable percentage widgets: linear, circular, gradient circle and wave.
63Compare - zo_animated_border
Add animated, glowing, and gradient borders to any Flutter widget.
76Compare - simple_ripple_animation
A customizable Flutter widget for ripple and pulse animations.
75Compare
Works with
Packages commonly used together with mesh: ones it builds on, ones built on it, and its own family.
- archivemesh depends on itEncodes and decodes archive and compression formats such as zip, tar, gzip, and zlib.
- flutter_shadersmesh depends on itUtilities and shaders for working with the FragmentProgram API in Flutter
- cached_valuemesh depends on itA simple way to cache values that result from expensive operations.
- binarizemesh depends on itStreamlined and extendable binary data creation and reading.