WheelFrame class abstract

The frame drawn around a SpinnerWheel.

Pick a ready-made frame:

Or make your own with WheelFrame.custom, or by extending this class and overriding paintBack and paintFront. To use an image instead, pass it as SpinnerWheel.background.

Frames are painted in two layers: paintBack behind the slices and paintFront in front of them, so the slices can sit inside the frame.

Implementers

Constructors

WheelFrame()
Constant constructor for subclasses.
const
WheelFrame.classic({Color rimColor, Color? rimHighlightColor, Color trimColor, Color studColor, int toothCount, int studCount, Color plateColor, bool shadow})
A red rim with a silver trim, pointed teeth and gold studs.
const
factory
WheelFrame.custom({required WheelFramePaint paintFront, WheelFramePaint? paintBack, double preferredInset, Color? indicatorColor})
A frame painted by your own functions.
const
factory
WheelFrame.neon({Color color, Color secondaryColor, Color plateColor})
Two glowing neon tubes on a dark ring.
const
factory
WheelFrame.royal({Color goldColor, Color gemColor, int gemCount, Color plateColor, bool shadow})
Polished gold set with gems and pearls.
const
factory
WheelFrame.wooden({Color woodColor, Color brassColor, int handleCount, bool shadow})
A ship's helm: a wooden rim with brass fittings and turned handles.
const
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
indicatorColor → Color?
A pointer color that suits this frame, used when the wheel doesn't set indicatorColor. Null keeps the default red.
no setter
preferredInset → double
The SpinnerWheel.wheelInset this frame is designed for, used when the wheel doesn't set one. It decides how much room the frame gets around the slices.
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
paintBack(Canvas canvas, WheelFrameGeometry geometry) → void
Paints the part of the frame behind the slices.
paintFront(Canvas canvas, WheelFrameGeometry geometry) → void
Paints the part of the frame in front of the slices.
shouldRepaint(covariant WheelFrame oldFrame) → bool
Whether this frame paints differently from oldFrame.
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

paintDropShadow(Canvas canvas, WheelFrameGeometry geometry, double radius) → void
Paints a soft drop shadow under a circle of radius.
paintPlate(Canvas canvas, WheelFrameGeometry geometry, double radius, Color color) → void
Paints a shaded disc of color with radius, lit from the top left.
paintSliceShadow(Canvas canvas, WheelFrameGeometry geometry, {double strength = 0.33}) → void
Paints a soft shadow on the outer edge of the slices, so they look set into the frame.
paintStud(Canvas canvas, Offset center, double radius, Color color, {bool shadow = true}) → void
Paints a shiny round stud of color at center.