feat: 静态页面开发完成

This commit is contained in:
2026-05-21 14:09:46 +08:00
parent 8156e8efbf
commit 763aef6bb9
73 changed files with 6345 additions and 1370 deletions

View File

@@ -4,6 +4,7 @@ import 'package:go_router/go_router.dart';
import '../providers/order_provider.dart';
import '../theme.dart';
import '../l10n/app_localizations.dart';
import '../widgets/skeleton.dart';
class OrderDetailPage extends ConsumerStatefulWidget {
final String orderId;
@@ -29,8 +30,10 @@ class _OrderDetailPageState extends ConsumerState<OrderDetailPage> {
final order = state.currentOrder;
if (order == null) {
return const Scaffold(
body: Center(child: CircularProgressIndicator()),
return Scaffold(
backgroundColor: AppColors.background,
appBar: AppBar(title: Text(l10n.orderDetail)),
body: const DetailPageSkeleton(),
);
}
@@ -129,7 +132,7 @@ class _OrderDetailPageState extends ConsumerState<OrderDetailPage> {
children: [
Text(
l10n.productInfo,
style: const TextStyle(
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
color: AppColors.textPrimary,
@@ -154,7 +157,7 @@ class _OrderDetailPageState extends ConsumerState<OrderDetailPage> {
children: [
Text(
order.productName,
style: const TextStyle(
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
color: AppColors.textPrimary,
@@ -163,7 +166,7 @@ class _OrderDetailPageState extends ConsumerState<OrderDetailPage> {
const SizedBox(height: 6),
Text(
'${l10n.quantity}: x${order.quantity}',
style: const TextStyle(
style: TextStyle(
fontSize: 14,
color: AppColors.textSecondary,
),
@@ -171,7 +174,7 @@ class _OrderDetailPageState extends ConsumerState<OrderDetailPage> {
const SizedBox(height: 4),
Text(
'${l10n.unitPrice}: ¥${(order.amount / order.quantity).toStringAsFixed(2)}',
style: const TextStyle(
style: TextStyle(
fontSize: 13,
color: AppColors.textTertiary,
),
@@ -219,7 +222,7 @@ class _OrderDetailPageState extends ConsumerState<OrderDetailPage> {
children: [
Text(
l10n.paymentInfo,
style: const TextStyle(
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
color: AppColors.textPrimary,
@@ -277,7 +280,7 @@ class _OrderDetailPageState extends ConsumerState<OrderDetailPage> {
children: [
Text(
l10n.orderInfo,
style: const TextStyle(
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
color: AppColors.textPrimary,
@@ -319,12 +322,12 @@ class _OrderDetailPageState extends ConsumerState<OrderDetailPage> {
children: [
Text(
label,
style: const TextStyle(fontSize: 12, color: AppColors.textTertiary),
style: TextStyle(fontSize: 12, color: AppColors.textTertiary),
),
const SizedBox(height: 2),
Text(
value,
style: const TextStyle(
style: TextStyle(
fontSize: 15,
fontWeight: FontWeight.w500,
color: AppColors.textPrimary,