RingColorScheme class
Color scheme for painting progress rings.
A single color scheme will be used by a Ring. You can provide only one of
the parameters. The order of precedence when multiple params are availble is
ringGradients > ringColors > ringGradient > ringColor.
When single color params(ringColor, ringColors) are provided if
gradient is true
then the end color for the ring will be brightened
by intensity%.
When painting for unavailable nth number ring is required, the colors will be interpolated from the last element in the list. For subsequent rings where color is not available, when gradient is true then end color of previous ring is used as start color for this ring and end color for this ring is generated by brightening of start color. When gradient is false, start color is obtained by brightening previous ring color, then this ring is painted with same color For more explanation and examples, read property documentation.
Constructors
Properties
- backgroundColor → Color?
-
Color of background ring on which progress is drawn.
final
-
colors
→ List<
List< Color> > -
Get Colors for painting rings.
no setter
- first → Color?
-
Get first color from first ring. Also store the result of first run
to a cache variable.
no setter
- gradient → bool
-
True if the ring's color should change like gradient.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- intensity → double
-
Percentage of intensity for brightening ring colors.
final
- maxNumRing → int
-
Maximum color gradients to cache for this scheme.
final
- mode → String?
-
Get which value should be used for coloring paint.
no setter
- ringColor → Color?
-
Creates ring colors from a single color.
final
-
ringColors
→ List<
Color> ? -
Creates a ring color from a single color based on position of color.
final
-
ringGradient
→ List<
Color> ? -
Creates ring colors from a list of colors
(gradient will be forcefully switched to true).
final
-
ringGradients
→ List<
List< ?Color> > -
Creates ring colors from a list of list of colors
(gradient will be forcefully switched to true).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
backgroundRingPaint(
double width) → Paint - Paint for background ring.
-
getCirclePaints(
int ringNum, Offset center, double width) → RingPaints -
Get cached paints for
ringNum
ring. -
getPaints(
Offset center, double width) → List< RingPaints> ? - Get cached paints
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setPaints(
Offset center, double width) → void - Generate paints for caching
-
toString(
) → String -
A string representation of this object.
inherited
-
updateRingColors(
[int maxNumRing = 3]) → void - Update generated colors for more rings.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited