【问题标题】:how i can create custom progress indicators in flutter我如何在颤振中创建自定义进度指示器
【发布时间】:2020-06-18 17:04:15
【问题描述】:

如何在 Flutter 中制作如下图所示的自定义圆形进度指示器?

Gif of example

【问题讨论】:

  • 这称为微光效果。如果你用谷歌搜索,你会发现教程比我们在此处的答案中解释得更好。

标签: flutter flutter-layout flutter-animation


【解决方案1】:

您可以使用Shimmer 包来实现这一点。 将 Shimmer 包添加到您的项目中并像这样使用它。

SizedBox(
  width: 200.0,
  height: 100.0,
  child: Shimmer.fromColors(
    baseColor: Colors.red,
    highlightColor: Colors.yellow,
    child: Text(
      'Shimmer',
      textAlign: TextAlign.center,
      style: TextStyle(
        fontSize: 40.0,
        fontWeight:
        FontWeight.bold,
      ),
    ),
  ),
);

【讨论】:

    猜你喜欢
    • 2018-11-01
    • 2021-02-13
    • 2023-03-03
    • 2023-04-11
    • 2021-07-23
    • 2020-02-18
    • 1970-01-01
    • 2021-01-08
    • 2020-11-01
    相关资源
    最近更新 更多