どうも、ちょげ(@chogetarou)です。
Textの取り消し線の色を設定する方法を紹介します。
方法

Textの取り消し線の色を設定するには、TextStyleの引数「decorationColor」を使います。
具体的には、TextStyleの引数「decorationColor」に取り消し線の色を指定します。
Text(
'テキスト',
style: TextStyle(
decoration: TextDecoration.lineThrough,
decorationColor: /*色*/,
),
),
TextStyleの引数「decorationColor」を使えば、Textの取り消し線の色を設定することが出来ます。
使用例
以下は、使用例です。

Text(
'Hello Flutter',
style: TextStyle(
decoration: TextDecoration.lineThrough,
decorationColor: Colors.red,
),
),
コメント