blackBox method

ColoredBox blackBox()

Wraps the widget in a ColoredBox with black color.

Uses CupertinoColors.black which provides a pure black background. This color does not adapt to light/dark mode and remains consistently black.

Returns a ColoredBox containing the current widget with black background.

Example:

Text('Dark Mode', style: TextStyle(color: Colors.white)).blackBox()

Implementation

ColoredBox blackBox() => coloredBox(CupertinoColors.black);