GradientColor constructor
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.
テーマの色設定にグラデーションの要素を加えることができます。
mainColorとsubColorを渡すことで2色のグラデーションを設定可能です。
グラデーションとして用いるためにはColor.toLinearGradient
を利用してグラデーションオブジェクトに変換する必要があります。
Implementation
const GradientColor(
this.mainColor,
this.subColor,
);