isAntiAlias property

bool isAntiAlias
final

Whether to apply anti-aliasing when painting the box.

Defaults to true.

When true, the painted box will have smooth edges. This is crucial for animations and transformations (such as rotation or scaling) where the widget's edges may not align perfectly with the physical pixel grid. Anti-aliasing allows for sub-pixel rendering, which prevents a 'jagged' appearance during motion and ensures visually smooth transitions.

Set this to false for specific use cases where multiple ColoredBox widgets are positioned adjacent to each other to form a larger, seamless area of solid color. With anti-aliasing enabled (true), faint seams or gaps might appear between the boxes due to the semi-transparent pixels at their edges. Disabling anti-aliasing ensures that the boxes align perfectly without such visual artifacts.

See also:

Implementation

final bool isAntiAlias;