update

parent ebc14b30
......@@ -10,6 +10,7 @@ class Favorite extends StatefulWidget {
class _FavoriteState extends State<Favorite> {
bool checkBoxValue = false;
int a = 1;
@override
Widget build(BuildContext context) {
......@@ -44,7 +45,7 @@ class _FavoriteState extends State<Favorite> {
),
color: Color(0xFF3694A3),
child: Text(
'ยืนยัน',
'เพิ่มลงในตระกร้าของฉัน',
style: TextStyle(
fontSize: SizeConfig.getFontSize(16),
fontWeight: FontWeight.bold,
......@@ -247,13 +248,17 @@ class _FavoriteState extends State<Favorite> {
child: Text('-'),
padding:
EdgeInsets.only(right: 0),
onPressed: () {},
onPressed: () {
setState(() {
a=a-1;
});
},
),
),
Padding(
padding: const EdgeInsets.only(
right: 8, left: 8),
child: Text('1'),
child: Text('$a'),
),
SizedBox(
width: 20.0,
......@@ -262,7 +267,9 @@ class _FavoriteState extends State<Favorite> {
child: Text('+'),
padding:
EdgeInsets.only(right: 0),
onPressed: () {},
onPressed: () {
a=a+1;
},
),
),
],
......
......@@ -11,6 +11,9 @@ class Payment extends StatefulWidget {
}
class _PaymentState extends State<Payment> {
int a = 1;
@override
Widget build(BuildContext context) {
SizeConfig(context);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment