WavePainterData class

The data needed to paint a wave background.

A wave background is a background that has gently flowing sine waves that move across the screen in a certain direction.

Inheritance

Constructors

WavePainterData.new({Color backgroundColor = Colors.transparent, required List<Wave> waves})
Creates a new WavePainterData object.
const

Properties

backgroundColor Color
The color of the background behind the waves.
final
hashCode int
Note: The order of the elements in the waves list is important—if the two objects have the same waves 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
waves List<Wave>
The waves that will be moving across the screen.
no setter

Methods

addAllWaves(List<Wave> waves) → void
Adds a list of waves to the end of the list of waves.
addWave(Wave wave) → void
Adds a wave to the end of the list of waves.
copy() WavePainterData
Returns a copy of this object.
override
copyWith({Color? backgroundColor, List<Wave>? waves}) WavePainterData
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
insertAllWaves(int index, List<Wave> waves) → void
Adds a list of waves at the given index in the list of waves.
insertWave(int index, Wave wave) → void
Adds a wave at the given index in the list of waves.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeWave(Wave wave) bool
Removes the first occurrence of the given wave from the list of waves.
removeWaveAt(int index) Wave?
Removes the wave at the given index from the list of waves.
removeWaveCompletely(Wave wave) bool
Removes all occurrences of the given wave from the list of waves.
toString() String
A string representation of this object.
override

Operators

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