【发布时间】:2020-03-05 17:32:46
【问题描述】:
我在 android studio 中创建了颤振项目,并试图显示小吃栏无限持续时间。这是我的代码
final snackBar = SnackBar(
content: Text('Cart:'+countProducts.toString()+" Products($countCost:sum)",style: TextStyle(color: Colors.black),),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.only(topLeft:Radius.circular(22),topRight:Radius.circular(22))),
backgroundColor: Colors.white70,
action: SnackBarAction(
textColor: Colors.blueAccent,
label: "Buy",
onPressed: () {
// Some code to undo the change.
},
),
);
Scaffold.of(context).showSnackBar(snackBar);
还有另一个按钮可以更改快餐栏文本。但我不想让它消失。那么如何在颤动中显示小吃吧无限持续时间
【问题讨论】: