FaderPainterData class

The data needed to paint a fader background.

A fader background is a background that fades between a set of colors.

Inheritance

Constructors

FaderPainterData({FaderBehavior behavior = FaderBehavior.specifiedOrder, required List<Color> colors})
Creates a new FaderPainterData object.
const

Properties

behavior → FaderBehavior
The behavior of the fader.
final
colors → List<Color>
The colors the fader will go through.
no setter
hashCode → int
Note: The order of the elements in the colors list is important—if the two objects have the same colors but in a different order, they will not have the same hash code.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addAllColors(List<Color> colors) → void
Adds a list of colors to the end of the list of colors the fader will go through.
addColor(Color color) → void
Adds a color to the end of the list of colors the fader will go through.
copy() → FaderPainterData
Returns a copy of this object.
override
copyWith({FaderBehavior? behavior, List<Color>? colors}) → FaderPainterData
Returns a copy of this object with its field values replaced by the ones provided to this method.
override
getPainter(Animation<double> animation) → Painter
Returns a Painter object that will paint the background.
override
insertAllColors(int index, List<Color> colors) → void
Adds a list of colors at the given index in the list of colors the fader will go through.
insertColor(int index, Color color) → void
Adds a color at the given index in the list of colors the fader will go through.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeColor(Color color) → bool
Removes the first occurrence of the given color from the list of colors the fader will go through.
removeColorAt(int index) → Color?
Removes the color at the given index from the list of colors the fader will go through.
removeColorCompletely(Color color) → bool
Removes all occurrences of the given color from the list of colors the fader will go through.
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
Note: The order of the elements in the colors list is important—if the two objects have the same colors but in a different order, they will not be considered equal.
override