CircularProgressIndicator

循环进度指示器视图

定义作用

参数

const CircularProgressIndicator({
    super.key,
    super.value,
    super.backgroundColor,
    super.color,
    super.valueColor,
    this.strokeWidth = 4.0,//条的宽度
    super.semanticsLabel,//描述CircularProgressIndicator的预期用途
    super.semanticsValue,//为屏幕阅读器提供有关当前进度的信息,给盲人用的,比如设置0.3这个进度时,就会为盲人读30%
})

代码示例

无限循环指示器

CircularProgressIndicator(
    backgroundColor: Colors.blue,
    valueColor: AlwaysStoppedAnimation<Color>(Colors.red),
)

显示进度的指示器

CircularProgressIndicator(
    value: 0.3,
    backgroundColor: Colors.blue,
    valueColor: AlwaysStoppedAnimation<Color>(Colors.red),
)

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注