Commit 3dfdbb0d authored by Jasa Digital's avatar Jasa Digital

pickup state fixed

parent 375f32da
...@@ -334,7 +334,7 @@ class PickUpState extends StatelessWidget { ...@@ -334,7 +334,7 @@ class PickUpState extends StatelessWidget {
axis: TimelineAxis.horizontal, axis: TimelineAxis.horizontal,
endChild: defaultText( endChild: defaultText(
context, context,
'Ready For Pickup', 'Order Picked Up',
maxLines: 2, maxLines: 2,
textAlign: TextAlign.center, textAlign: TextAlign.center,
overFlow: TextOverflow.ellipsis, overFlow: TextOverflow.ellipsis,
...@@ -350,7 +350,9 @@ class PickUpState extends StatelessWidget { ...@@ -350,7 +350,9 @@ class PickUpState extends StatelessWidget {
width: 42, width: 42,
height: 42, height: 42,
decoration: BoxDecoration( decoration: BoxDecoration(
color: getColorStatusPickUp(dataBill[0].state), color: (dataBill[0].state == orderStateDone)
? successColor
: disabledColor,
shape: BoxShape.circle, shape: BoxShape.circle,
), ),
child: const Center( child: const Center(
...@@ -369,10 +371,9 @@ class PickUpState extends StatelessWidget { ...@@ -369,10 +371,9 @@ class PickUpState extends StatelessWidget {
} }
Color getColorStatusPickUp(int orderState) { Color getColorStatusPickUp(int orderState) {
if (orderState != orderStateReady && orderState != orderStateDone) { if (orderState == orderStateReady || orderState == orderStateDone) {
return disabledColor; return successColor;
} else if (orderState == orderStateReady && orderState != orderStateDone) { } else {
return disabledColor; return disabledColor;
} }
return successColor;
} }
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