SnackBar自定义动画颤动

时间:2020-11-04 14:36:58

标签: flutter dart flutter-animation

我正在尝试在快餐栏上制作一些自定义动画。我不知道该怎么做!几乎,我在快餐栏类中找到了一个动画字段,但是我不知道如何使用它……这是我的快餐栏代码:

Scaffold.of(context).hideCurrentSnackBar();
    final snackBar = SnackBar(
      shape: RoundedRectangleBorder(
        borderRadius: BorderRadius.all(
          Radius.circular(BorderRadiusMedium),
        ),
      ),
      backgroundColor: Colors.white,
      behavior: SnackBarBehavior.floating,
      padding: EdgeInsets.zero,
      margin: EdgeInsets.only(bottom: BottomAppBarHeight + PaddingMedium * 2),
      content: Container(
        child: Row(
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
          Container(
            width: 50.0,
            height: 50.0,
            decoration: BoxDecoration(
              shape: BoxShape.circle,
              color: Colors.green,
            ),
            child: Icon(
              Icons.check,
              color: Colors.white,
            ),
          ),
          Text(
            'Added to cart',
            style: TextStyle(color: BlackColor),
          ),
        ]),
      ),
    );
    Scaffold.of(context).showSnackBar(snackBar);
  }

我没有找到有关该操作的任何信息。请帮我!我想实现从下到上的动画播放

0 个答案:

没有答案