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

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

@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: CircularProgressIndicator(
backgroundColor: Colors.pink[100],
),
),
);
}
コメント