flutter_ui_toolbox 0.0.2
flutter_ui_toolbox: ^0.0.2 copied to clipboard
Flutter UI Toolbox is a lightweight, powerful, and easy-to-use package that provides essential extensions to simplify UI development in Flutter. From widget styling to context utilities, animations, d [...]
flutter_ui_toolbox #
Flutter UI Toolbox
color_extensions #
A useful extensions to the Color
class.
Description #
This package extends the Flutter Color
class with a variety of utility functions to manipulate colors, determine their darkness or lightness, and convert them to and from hex strings.
Features #
- Adjust Brightness: Lighten or darken a color by a specified percentage.
- Opacity Control: Create a color with a specific opacity level (0-100%).
- Dark/Light Detection: Determine if a color is considered dark or light.
- Hex Conversion: Convert a color to a hex string (
#RRGGBB
or#AARRGGBB
). - Hex to Color: Create a
Color
object from a hex string. - RGB to Color: Create a
Color
object from RGB values.
Examples #
Adjusting Brightness
Color baseColor = Colors.blue; Color lighterColor = baseColor.adjustBrightness(20); // Lightens by 20% Color darkerColor = baseColor.adjustBrightness(-20); // Darkens by 20%