AntiFlickerDirection enum

Defines the directions for the anti-flicker gradient used with GlassAntiFlicker.

This enum specifies the possible fade directions to prevent visual artifacts at the edges of glass panels in Arcane UI components. It enables smooth transitions between Glass elements and surrounding content, particularly useful in layouts like Section or FillScreen where glass overlays might otherwise cause flickering during animations or scrolling.

Key features:

  • Supports four cardinal directions for flexible edge handling.
  • Integrates seamlessly with ArcaneTheme for consistent styling.
  • Performance: Stateless and const, ensuring no unnecessary rebuilds in dynamic UIs like SliverScreen.

Usage example in a Section:

Section(
  child: GlassAntiFlicker(direction: AntiFlickerDirection.bottom),
)

See also:

  • doc/component/glass.md for detailed glass effect documentation.
  • GlassAntiFlicker, the widget that applies this gradient.
Inheritance
Available extensions

Values

top → const AntiFlickerDirection

Gradient fades from top to bottom, ideal for top edges of glass panels.

bottom → const AntiFlickerDirection

Gradient fades from bottom to top, suitable for bottom-aligned Glass in FillScreen.

left → const AntiFlickerDirection

Gradient fades from left to right, for left-side transitions in Section layouts.

Gradient fades from right to left, for right-side anti-flicker in navigation-heavy UIs.

Properties

alignmentDark Alignment

Available on AntiFlickerDirection, provided by the XAntiFlickerDirection extension

Gets the alignment for the dark end of the gradient, matching the direction's origin.
no setter
alignmentLight Alignment

Available on AntiFlickerDirection, provided by the XAntiFlickerDirection extension

Gets the alignment for the light end of the gradient, derived from the opposite direction.
no setter
hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
opposite AntiFlickerDirection

Available on AntiFlickerDirection, provided by the XAntiFlickerDirection extension

Gets the opposite direction for bidirectional gradient applications.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<AntiFlickerDirection>
A constant List of the values in this enum, in order of their declaration.