【发布时间】:2019-07-12 05:52:10
【问题描述】:
我需要实现一个像缩放一样的按钮,当我们点击“+”时,值应该增加,当我们点击“-”时,值应该减少,计算值应该显示在“+”的中间" 和 "-" 在按钮上。
RawMaterialButton(
fillColor: Colors.green,
splashColor: Colors.greenAccent,
onPressed: onPressed,
shape:const StadiumBorder(),
child: Padding(
padding: const EdgeInsets.all(3.0),
child: Row(
children: <Widget>[
const Icon(
Icons.add,
color: Colors.white,
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text("ADD",
style: TextStyle(
color: Colors.white,
),
),
),
const Icon(
Icons.remove,
color: Colors.white,
)
],
),
));
**但是我不知道如何创建两个不同的按钮 我只需要设计部分**
【问题讨论】:
-
Shubham,您可能知道,StackOverflow 不是代码编写服务,希望您先尝试解决自己的问题。请更新您的问题以显示您已经尝试过的内容,并在minimal, complete, and verifiable example 中显示您面临的具体问题。更多信息,请看how to ask一个好问题,并采取该站点的tour。