Flutter-动画过程小部件

时间:2020-01-31 05:20:39

标签: flutter dart flutter-animation

我想在动画中创建一个像这样的过程动画小部件,该控件的浏览量从1变为2。

enter image description here

欢迎提出任何建议

1 个答案:

答案 0 :(得分:0)

这可以通过使用Flutter小部件Stepper来实现,以下是Stepper Widget的基本实现

关于Medium here

的全文
Widget _tabStep() => Container(
    margin: EdgeInsets.only(top: 10),
    color: PURPLE,
    child: Stepper(
      steps: [
        Step(
          title: Text("First"),
          content: Text("This is our first example."),
        ),
        Step(
          title: Text("Second"),
          content: Text("This is our second example."),
        ),
        Step(
          title: Text("Third"),
          content: Text("This is our third example."),
        ),
        Step(
          title: Text("Forth"),
          content: Text("This is our forth example."),
        ),
      ],
      currentStep: _index,
      onStepTapped: (index) {
        setState(() {
          _index = index;
        });
      },
      onStepCancel: () {
        print("You are clicking the cancel button.");
      },
      onStepContinue: () {
        print("You are clicking the continue button.");
      },
    ),
  );