getOrderTrackingUiTemplate function

String getOrderTrackingUiTemplate({
  1. required String className,
  2. required String isLoading,
})

Implementation

String getOrderTrackingUiTemplate(
    {required String className, required String isLoading}) {
  return '''
CustomBody(
      title: "Track Order",
      isLoading: $isLoading,
      backgroundColor: AppColors.background,
      child: SingleChildScrollView(
        padding: EdgeInsets.all(20.sp),
        child: Column(
          children: [
            Container(
              padding: EdgeInsets.all(20.sp),
              decoration: BoxDecoration(
                color: AppColors.white,
                borderRadius: BorderRadius.circular(20.sp),
              ),
              child: Column(
                children: [
                  Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                      TextWidget(text: "Order ID", color: AppColors.grey, textSize: 13.sp),
                      TextWidget(text: "#ET-98765", fontWeight: FontWeight.bold, textSize: 13.sp),
                    ],
                  ),
                  SizedBox(height: 10.sp),
                  Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                      TextWidget(text: "Product", color: AppColors.grey, textSize: 13.sp),
                      TextWidget(text: "Premium Headphone", fontWeight: FontWeight.bold, textSize: 13.sp),
                    ],
                  ),
                ],
              ),
            ),
            SizedBox(height: 30.sp),

            // Stepper
            Column(
              children: [
                ${_buildTrackStep("Order Placed", "Your order has been placed successfully", "10:30 AM, 20 Oct", true, true)},
                ${_buildTrackStep("Processing", "Order is being processed and packed", "12:45 PM, 20 Oct", true, true)},
                ${_buildTrackStep("Shipped", "Order has been handed over to courier", "Pending", true, false)},
                ${_buildTrackStep("In Transit", "Order is on the way to your location", "---", false, false)},
                ${_buildTrackStep("Delivered", "Package reached destination", "---", false, false, isLast: true)},
              ],
            ),
          ],
        ),
      ),
    )''';
}