Newer
Older
import 'package:flutter/material.dart';
import 'package:food_app/config/colors.dart';
class SingleItem extends StatelessWidget {
bool isBool = false;
String productId;
int productQuantity;
{this.productQuantity,
this.productId,
this.isBool,
this.productImage,
this.productName,
this.productPrice,
@override
Widget build(BuildContext context) {
return Column(
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 10),
child: Row(
children: [
Expanded(
child: Container(
height: 100,
child: Center(
),
),
),
Expanded(
child: Container(
height: 100,
child: Column(
mainAxisAlignment: isBool == false
? MainAxisAlignment.spaceAround
: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
children: [
Text(
style: TextStyle(
color: textColor, fontWeight: FontWeight.bold),
),
Text(
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
style: TextStyle(
color: textColor,
fontWeight: FontWeight.bold,
),
),
],
),
isBool == false
? Container(
margin: EdgeInsets.only(right: 5),
padding: EdgeInsets.symmetric(horizontal: 10),
height: 35,
decoration: BoxDecoration(
border: Border.all(color: Colors.grey),
borderRadius: BorderRadius.circular(30),
),
child: Row(
children: [
Expanded(
child: Text(
"50 Gram",
style: TextStyle(
color: Colors.grey,
fontSize: 12,
),
),
),
Center(
child: Icon(
Icons.arrow_drop_down,
size: 20,
color: primaryColor,
),
)
],
),
)
: Text("50 Gram")
],
),
),
),
Expanded(
child: Container(
height: 100,
child: Container(
height: 100,
padding: isBool == false
? EdgeInsets.symmetric(horizontal: 15, vertical: 32)
: EdgeInsets.only(left: 15, right: 15),
child: isBool == false
? Container(
height: 25,
width: 50,
decoration: BoxDecoration(
border: Border.all(color: Colors.grey),
borderRadius: BorderRadius.circular(30),
),
child: Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.add,
color: primaryColor,
size: 20,
),
Text(
"ADD",
style: TextStyle(
color: primaryColor,
),
),
],
),
),
)
padding: const EdgeInsets.only(top: 8),
child: Column(
children: [
InkWell(
onTap: onDelete,
child: Icon(
Icons.delete,
size: 30,
color: Colors.black54,
),
Container(
height: 25,
width: 70,
decoration: BoxDecoration(
border: Border.all(color: Colors.grey),
borderRadius: BorderRadius.circular(30),
),
child: Center(
child: Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Icon(
Icons.remove,
color: primaryColor,
size: 20,
),
Text(
"1",
style: TextStyle(
color: primaryColor,
),
),
Icon(
Icons.add,