feat: update order summary
This commit is contained in:
@@ -34,26 +34,7 @@ class OrderSummary extends StatelessWidget {
|
|||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
IntrinsicHeight(
|
_SummaryStat(
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: _SummaryStat(
|
|
||||||
title: context.lang.total_orders,
|
|
||||||
value: totalOrder.count,
|
|
||||||
amount: totalOrder.amount,
|
|
||||||
icon: Icons.receipt_long_rounded,
|
|
||||||
iconBackground: AppColor.white.withOpacity(0.2),
|
|
||||||
isLoading: isLoading,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
VerticalDivider(
|
|
||||||
width: 28,
|
|
||||||
thickness: 1,
|
|
||||||
color: AppColor.white.withOpacity(0.25),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: _SummaryStat(
|
|
||||||
title: context.lang.pending_order,
|
title: context.lang.pending_order,
|
||||||
value: totalPendingOrder.count,
|
value: totalPendingOrder.count,
|
||||||
amount: totalPendingOrder.amount,
|
amount: totalPendingOrder.amount,
|
||||||
@@ -61,10 +42,6 @@ class OrderSummary extends StatelessWidget {
|
|||||||
iconBackground: _pendingColor,
|
iconBackground: _pendingColor,
|
||||||
isLoading: isLoading,
|
isLoading: isLoading,
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SpaceHeight(16),
|
const SpaceHeight(16),
|
||||||
_PendingRatioBar(ratio: pendingRatio),
|
_PendingRatioBar(ratio: pendingRatio),
|
||||||
const SpaceHeight(8),
|
const SpaceHeight(8),
|
||||||
@@ -113,7 +90,7 @@ class _SummaryStat extends StatelessWidget {
|
|||||||
color: iconBackground,
|
color: iconBackground,
|
||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(10),
|
||||||
),
|
),
|
||||||
child: Icon(icon, color: AppColor.white, size: 16),
|
child: Icon(icon, color: AppColor.white, size: 20),
|
||||||
),
|
),
|
||||||
const SpaceWidth(8),
|
const SpaceWidth(8),
|
||||||
Expanded(
|
Expanded(
|
||||||
@@ -121,7 +98,7 @@ class _SummaryStat extends StatelessWidget {
|
|||||||
title,
|
title,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: AppStyle.sm.copyWith(
|
style: AppStyle.lg.copyWith(
|
||||||
color: AppColor.white.withOpacity(0.9),
|
color: AppColor.white.withOpacity(0.9),
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
@@ -133,7 +110,7 @@ class _SummaryStat extends StatelessWidget {
|
|||||||
if (isLoading) ...[
|
if (isLoading) ...[
|
||||||
_shimmerBox(width: 110, height: 26),
|
_shimmerBox(width: 110, height: 26),
|
||||||
const SpaceHeight(6),
|
const SpaceHeight(6),
|
||||||
_shimmerBox(width: 64, height: 16),
|
_shimmerBox(width: 80, height: 20),
|
||||||
] else ...[
|
] else ...[
|
||||||
TweenAnimationBuilder<int>(
|
TweenAnimationBuilder<int>(
|
||||||
tween: IntTween(begin: 0, end: amount),
|
tween: IntTween(begin: 0, end: amount),
|
||||||
@@ -170,7 +147,7 @@ class _SummaryStat extends StatelessWidget {
|
|||||||
context.lang.order_count_label(animatedValue),
|
context.lang.order_count_label(animatedValue),
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: AppStyle.md.copyWith(
|
style: AppStyle.xl.copyWith(
|
||||||
color: AppColor.white.withOpacity(0.9),
|
color: AppColor.white.withOpacity(0.9),
|
||||||
fontWeight: FontWeight.w700,
|
fontWeight: FontWeight.w700,
|
||||||
),
|
),
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ description: "A new Flutter project."
|
|||||||
|
|
||||||
publish_to: "none"
|
publish_to: "none"
|
||||||
|
|
||||||
version: 1.0.4+17
|
version: 1.0.4+18
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.8.1
|
sdk: ^3.8.1
|
||||||
|
|||||||
Reference in New Issue
Block a user