CupertinoBoxColorsExtension extension

Extension on Widget that provides convenient methods for wrapping widgets in ColoredBox containers with predefined Cupertino system colors.

This extension simplifies the process of adding colored backgrounds to widgets by providing semantic method names that correspond to iOS system colors. All methods return a ColoredBox widget that wraps the current widget with the specified background color.

Example usage:

Text('Hello World')
  .redBox()        // Wraps text with red background
  .padding(8.0);   // Can be chained with other extensions

The colors used are adaptive and will automatically adjust based on the current brightness mode (light/dark) when applicable.

on

Methods

activeBlueBox() ColoredBox

Available on Widget, provided by the CupertinoBoxColorsExtension extension

Wraps the widget in a ColoredBox with active blue color.
activeGreenBox() ColoredBox

Available on Widget, provided by the CupertinoBoxColorsExtension extension

Wraps the widget in a ColoredBox with active green color.
blackBox() ColoredBox

Available on Widget, provided by the CupertinoBoxColorsExtension extension

Wraps the widget in a ColoredBox with black color.
blueBox() ColoredBox

Available on Widget, provided by the CupertinoBoxColorsExtension extension

Wraps the widget in a ColoredBox with system blue color.
brownBox() ColoredBox

Available on Widget, provided by the CupertinoBoxColorsExtension extension

Wraps the widget in a ColoredBox with system brown color.
cyanBox() ColoredBox

Available on Widget, provided by the CupertinoBoxColorsExtension extension

Wraps the widget in a ColoredBox with system cyan color.
darkGrayBox() ColoredBox

Available on Widget, provided by the CupertinoBoxColorsExtension extension

Wraps the widget in a ColoredBox with dark background gray color.
destructiveRedBox() ColoredBox

Available on Widget, provided by the CupertinoBoxColorsExtension extension

Wraps the widget in a ColoredBox with destructive red color.
greenBox() ColoredBox

Available on Widget, provided by the CupertinoBoxColorsExtension extension

Wraps the widget in a ColoredBox with system green color.
greyBox() ColoredBox

Available on Widget, provided by the CupertinoBoxColorsExtension extension

Wraps the widget in a ColoredBox with system grey color.
lightGrayBox() ColoredBox

Available on Widget, provided by the CupertinoBoxColorsExtension extension

Wraps the widget in a ColoredBox with light background gray color.
orangeAccentBox() ColoredBox

Available on Widget, provided by the CupertinoBoxColorsExtension extension

Wraps the widget in a ColoredBox with active orange color.
orangeBox() ColoredBox

Available on Widget, provided by the CupertinoBoxColorsExtension extension

Wraps the widget in a ColoredBox with system orange color.
pinkBox() ColoredBox

Available on Widget, provided by the CupertinoBoxColorsExtension extension

Wraps the widget in a ColoredBox with system pink color.
purpleBox() ColoredBox

Available on Widget, provided by the CupertinoBoxColorsExtension extension

Wraps the widget in a ColoredBox with system purple color.
redBox() ColoredBox

Available on Widget, provided by the CupertinoBoxColorsExtension extension

Wraps the widget in a ColoredBox with system red color.
tealBox() ColoredBox

Available on Widget, provided by the CupertinoBoxColorsExtension extension

Wraps the widget in a ColoredBox with system teal color.
whiteBox() ColoredBox

Available on Widget, provided by the CupertinoBoxColorsExtension extension

Wraps the widget in a ColoredBox with white color.
yellowBox() ColoredBox

Available on Widget, provided by the CupertinoBoxColorsExtension extension

Wraps the widget in a ColoredBox with system yellow color.