eo_color
2.2.3, released 2 years ago by dartoos.dev
Object-oriented API for Material Design color palettes and swatches
What it does
Provides classes such as Blue(), Grey.light(), and Swatch collections to retrieve Material Design colors in a readable, declarative way. It replaces Flutter’s numeric index system with named constructors and adverbs.
AI-written summary of version 2.2.3, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want a more readable way to pick Material Design colors
- You need to build a custom color package or theme
- You prefer object-oriented APIs over static color maps
Skip it when
- You need the absolute smallest dependency footprint
- You are targeting a very old Flutter SDK that doesn’t support null safety
Strengths
- Readable, declarative API
- Full coverage of Material Design palettes and accents
- Supports swatches and gradients
- No code generation required
Weaknesses
- Only covers Material Design colors
- No support for custom color palettes out of the box
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
```dart
import 'package:eo_color/eo_color.dart';
Widget build(BuildContext context) {
return Container(color: const Blue().color);
}
```Alternatives
Packages that do the same job and could replace eo_color.
- dynamic_color
Create Material color schemes based on a platform's implementation of dynamic color.
83Compare - flex_color_scheme
Builds matched light and dark ThemeData for Flutter with Material design themes and seed colors.
89Compare - material_color_utilities
Algorithms and utilities for the Material Design 3 color system.
86Compare - dynamic_system_colors
Create Material color schemes based on the platform's dynamic color implementation.
69Compare