parent product and sub product update

merge-update-with-lab-changes
hussam al-habibeh 5 years ago
parent cb9d8cb9d9
commit 0a1db70229

@ -547,7 +547,8 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
thickness: 1.0,
color: Colors.grey.shade400,
),
styleOne == true
model.parentProducts.isNotEmpty
? styleOne == true
? Container(
height: model.parentProducts.length * MediaQuery.of(context).size.height * 0.15,
child: GridView.builder(
@ -643,7 +644,8 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
padding: EdgeInsets.all(4),
decoration: BoxDecoration(
color: Color(0xffb23838),
borderRadius: BorderRadius.only(topLeft: Radius.circular(6)),
borderRadius:
BorderRadius.only(topLeft: Radius.circular(6)),
),
child: Texts(
model.parentProducts[index].rxMessage != null
@ -700,7 +702,8 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
StarRating(
totalAverage:
model.parentProducts[index].approvedRatingSum > 0
? (model.parentProducts[index].approvedRatingSum
? (model.parentProducts[index]
.approvedRatingSum
.toDouble() /
model.parentProducts[index]
.approvedRatingSum
@ -780,7 +783,8 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
padding: EdgeInsets.all(4),
decoration: BoxDecoration(
color: Color(0xffb23838),
borderRadius: BorderRadius.only(topLeft: Radius.circular(6)),
borderRadius:
BorderRadius.only(topLeft: Radius.circular(6)),
),
child: Texts(
model.parentProducts[index].rxMessage != null
@ -836,7 +840,8 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
model.parentProducts[index].approvedRatingSum > 0
? (model.parentProducts[index].approvedRatingSum
.toDouble() /
model.parentProducts[index].approvedRatingSum
model.parentProducts[index]
.approvedRatingSum
.toDouble())
.toDouble()
: 0,
@ -865,6 +870,34 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
);
}),
)
: Padding(
padding: const EdgeInsets.all(12.0),
child: Container(
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Image.asset(
'assets/images/new-design/empty_box.png',
width: 100,
height: 100,
fit: BoxFit.cover,
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'There is no data',
style: TextStyle(fontSize: 30),
),
)
],
),
),
),
)
],
),
),

@ -522,7 +522,8 @@ class _SubCategorisePageState extends State<SubCategorisePage> {
thickness: 1.0,
color: Colors.grey.shade400,
),
styleOne == true
model.subProducts.isNotEmpty
? styleOne == true
? Container(
height: model.subProducts.length * MediaQuery.of(context).size.height * 0.15,
child: GridView.builder(
@ -597,7 +598,8 @@ class _SubCategorisePageState extends State<SubCategorisePage> {
padding: EdgeInsets.all(4),
decoration: BoxDecoration(
color: Color(0xffb23838),
borderRadius: BorderRadius.only(topLeft: Radius.circular(6)),
borderRadius:
BorderRadius.only(topLeft: Radius.circular(6)),
),
child: Texts(
model.subProducts[index].rxMessage != null
@ -640,7 +642,8 @@ class _SubCategorisePageState extends State<SubCategorisePage> {
model.subProducts[index].approvedRatingSum > 0
? (model.subProducts[index].approvedRatingSum
.toDouble() /
model.subProducts[index].approvedRatingSum
model.subProducts[index]
.approvedRatingSum
.toDouble())
.toDouble()
: 0,
@ -717,7 +720,8 @@ class _SubCategorisePageState extends State<SubCategorisePage> {
padding: EdgeInsets.all(4),
decoration: BoxDecoration(
color: Color(0xffb23838),
borderRadius: BorderRadius.only(topLeft: Radius.circular(6)),
borderRadius:
BorderRadius.only(topLeft: Radius.circular(6)),
),
child: Texts(
model.subProducts[index].rxMessage != null
@ -770,8 +774,10 @@ class _SubCategorisePageState extends State<SubCategorisePage> {
Row(
children: [
StarRating(
totalAverage: model.subProducts[index].approvedRatingSum > 0
? (model.subProducts[index].approvedRatingSum.toDouble() /
totalAverage:
model.subProducts[index].approvedRatingSum > 0
? (model.subProducts[index].approvedRatingSum
.toDouble() /
model.subProducts[index].approvedRatingSum
.toDouble())
.toDouble()
@ -801,6 +807,34 @@ class _SubCategorisePageState extends State<SubCategorisePage> {
);
}),
)
: Padding(
padding: const EdgeInsets.all(12.0),
child: Container(
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Image.asset(
'assets/images/new-design/empty_box.png',
width: 100,
height: 100,
fit: BoxFit.cover,
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'There is no data',
style: TextStyle(fontSize: 30),
),
)
],
),
),
),
)
],
),
),

Loading…
Cancel
Save