颤动 - 制作反向线性进度指示器

问题描述

我想做一个如下图所示的反向线性进度指标加载

reverse linearprogressindicator

我尝试使用 animationController 使负载恢复原状。但不太流畅,方向也略有不同。有谁知道如何使它看起来像那样? 看下面的视频

current reverse loading

这里附上一段代码

@override
  void initState() {
    // Todo: implement initState
    super.initState();
    controller = AnimationController(
        duration: const Duration(milliseconds: 1000),vsync: this);
    animation = Tween(begin: 0.0,end: 1.0).animate(controller)
      ..addListener(() {
        setState(() {
          // the state that has changed here is the animation object’s value
        });
      });
    controller.repeat(reverse: true);
  }

Container(
     height: MediaQuery.of(context).size.height * .005,child: LinearProgressIndicator(
     value: animation.value,// minHeight: 1.0,// value: 2.0,backgroundColor: Colors.white24,valueColor: AlwaysstoppedAnimation<Color>(Colors.red),semanticslabel: "Finding incoming"))

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)