WheelFrame class abstract
The frame drawn around a SpinnerWheel.
Pick a ready-made frame:
- WheelFrame.classic: a red rim with silver teeth and gold studs.
- WheelFrame.royal: polished gold set with gems.
- WheelFrame.neon: glowing tubes on a dark ring.
- WheelFrame.wooden: a ship's helm with turned wooden handles.
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.
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.
constfactory
- WheelFrame.custom({required WheelFramePaint paintFront, WheelFramePaint? paintBack, double preferredInset, Color? indicatorColor})
-
A frame painted by your own functions.
constfactory
- WheelFrame.neon({Color color, Color secondaryColor, Color plateColor})
-
Two glowing neon tubes on a dark ring.
constfactory
- WheelFrame.royal({Color goldColor, Color gemColor, int gemCount, Color plateColor, bool shadow})
-
Polished gold set with gems and pearls.
constfactory
- WheelFrame.wooden({Color woodColor, Color brassColor, int handleCount, bool shadow})
-
A ship's helm: a wooden rim with brass fittings and turned handles.
constfactory
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.wheelInsetthis 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
colorwithradius, 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
coloratcenter.