GradientColor constructor

const GradientColor(
  1. Color mainColor,
  2. Color subColor
)

You can add gradient elements to the theme's color settings.

Two color gradients can be set by passing mainColor and subColor.

To use it as a gradient, it must be converted to a gradient object using Color.toLinearGradient.

When used as a normal Color, the color of mainColor is used.

テーマの色設定にグラデーションの要素を加えることができます。

mainColorsubColorを渡すことで2色のグラデーションを設定可能です。

グラデーションとして用いるためにはColor.toLinearGradientを利用してグラデーションオブジェクトに変換する必要があります。

通常のColorとして利用される場合、mainColorの色が使用されます。

Implementation

const GradientColor(
  this.mainColor,
  this.subColor,
);