ColorRamp class final

The color ramp object.

This object is used to represent a color ramp object.

Implemented types

Constructors

ColorRamp({required PresetColorRampType type, required int size})
Creates a color ramp with a predefined color ramp type.
factory
ColorRamp.fromColors({required List<Color> colors, required int size})
Creates a custom color ramp with a linear gradient between the provided colors.
factory
ColorRamp.fromColorStops({required List<ColorStop> colorStops, required int size})
Creates a custom color ramp with a linear gradient between the provided color stops.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
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
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

withPresetColorRampTypeAndSize({required PresetColorRampType type, required int size}) ColorRamp?
Creates a color ramp with predefined color ramp type and size.