どうも、ちょげ(@chogetarou)です。
LinearProgressIndicatorの背景色を設定する方法を紹介します。
方法

LinearProgressIndicatorの背景色を設定するには、引数「backgroundColor」を使います。
具体的には、LinearProgressIndicatorの引数「backgroundColor」に設定したい背景色をColorsで指定します。
LinearProgressIndicator(
backgroundColor: /*Colorsで背景色を指定*/,
),
引数「backgroundColor」を使えば、LinearProgressIndicatorの背景色を設定することが出来ます。
使用例
以下は、使用例です。

@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: LinearProgressIndicator(
backgroundColor: Colors.yellow,
),
),
);
}
コメント