LinearGradient

Linear gradient.

A linear gradient to be used in a widget.

colors

Colors of the gradient.

The array of colors should include the same amount of elements as the gradients locations property.

colors: [Color]

locations

Locations of each color.

Each location should be a value in the range of 0 to 1 and indicates the location of each color in the gradients colors array.

The array of locations should include the same amount of elements as the gradients colors property.

locations: [number]

-new LinearGradient

Constructs a linear gradient.

new LinearGradient()