enhanced_gradients
2.0.0+1, released 9 months ago by leancode.co
Flutter gradient wrappers that interpolate colors in the HCT color system.
What it does
Provides enhanced versions of LinearGradient, RadialGradient, and SweepGradient that interpolate colors using the HCT color system rather than standard RGB. It also includes an HctColorTween for color transitions in Flutter animations.
AI-written summary of version 2.0.0+1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want smoother or more perceptually accurate color transitions in gradients.
- You are already using Material color utilities and want HCT-based animations or tweens.
Skip it when
- You require standard RGB or HSL color interpolation for specific design guidelines.
- You are using a Flutter version older than 3.27.0.
Strengths
- Easy to use via wrapper classes or extension methods.
- Includes a custom HctColorTween for animations.
Weaknesses
- HCT results are subjective and might not always look better than regular gradients depending on the effect.
- Requires a relatively recent minimum Flutter version (3.27.0).
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
LinearGradient(
colors: const [Color(0xFF000000), Color(0xFFFFFFFF)],
).enhanced()Alternatives
Packages that do the same job and could replace enhanced_gradients.
- c_material
Provides a large set of predefined Color constants and Material 3 theming utilities for Flutter.
58Compare - derived_colors
Generate color variants and modifications for Flutter applications.
50Compare - color_mesh
A multi-point mesh gradient that extends Gradient and can be used in decorations and animations.
48Compare - pigment
Parse string colors into Flutter Color objects
44Compare
Works with
Packages commonly used together with enhanced_gradients: ones it builds on, ones built on it, and its own family.