尺寸修改
This commit is contained in:
@@ -27,11 +27,11 @@ class CarInfoPage extends GetView<CarInfoController> {
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
_buildDriverInfoCard(),
|
||||
const SizedBox(height: 12),
|
||||
const SizedBox(height: 5),
|
||||
_buildCarBindingCard(),
|
||||
const SizedBox(height: 12),
|
||||
const SizedBox(height: 5),
|
||||
_buildCertificatesCard(),
|
||||
const SizedBox(height: 12),
|
||||
const SizedBox(height: 5),
|
||||
_buildTipsCard(),
|
||||
],
|
||||
),
|
||||
@@ -45,8 +45,8 @@ class CarInfoPage extends GetView<CarInfoController> {
|
||||
/// 1. 构建顶部的司机信息卡片(包含蓝色背景)
|
||||
Widget _buildDriverInfoCard() {
|
||||
return Card(
|
||||
elevation: 4,
|
||||
margin: EdgeInsets.zero, // Card 在蓝色背景内,不需要外边距
|
||||
elevation: 2,
|
||||
margin: EdgeInsets.zero,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
||||
child: Column(
|
||||
children: [
|
||||
@@ -55,23 +55,23 @@ class CarInfoPage extends GetView<CarInfoController> {
|
||||
child: Row(
|
||||
children: [
|
||||
const CircleAvatar(
|
||||
radius: 28,
|
||||
radius: 20,
|
||||
backgroundColor: Colors.blue,
|
||||
child: Icon(Icons.person, color: Colors.white, size: 36),
|
||||
child: Icon(Icons.person, color: Colors.white, size: 34),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Text(
|
||||
'王小龙',
|
||||
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
|
||||
Text(
|
||||
"${StorageService.to.name}",
|
||||
style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
const Text(
|
||||
'15888332828',
|
||||
style: TextStyle(color: Colors.grey, fontSize: 14),
|
||||
Text(
|
||||
"${StorageService.to.phone}",
|
||||
style: TextStyle(color: Colors.grey, fontSize: 11),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:ln_jq_app/storage_service.dart';
|
||||
import 'controller.dart';
|
||||
|
||||
// 假设您的 Controller 在这里,如果还没有,可以先创建一个空类
|
||||
@@ -56,7 +57,7 @@ class MinePage extends GetView<MineController> {
|
||||
child: Row(
|
||||
children: [
|
||||
const CircleAvatar(
|
||||
radius: 30,
|
||||
radius: 25,
|
||||
backgroundColor: Colors.blue,
|
||||
child: Icon(Icons.person, color: Colors.white, size: 40),
|
||||
),
|
||||
@@ -65,18 +66,18 @@ class MinePage extends GetView<MineController> {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Text(
|
||||
'王小龙',
|
||||
style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
|
||||
Text(
|
||||
"${StorageService.to.name}",
|
||||
style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
const Text(
|
||||
'15888332828',
|
||||
style: TextStyle(color: Colors.grey, fontSize: 14),
|
||||
Text(
|
||||
"${StorageService.to.phone}",
|
||||
style: TextStyle(color: Colors.grey, fontSize: 11),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
const Text(
|
||||
'未绑定车辆',
|
||||
Text(
|
||||
StorageService.to.hasVehicleInfo ? "已绑定车辆" : '未绑定车辆',
|
||||
style: TextStyle(color: Colors.orange, fontSize: 12),
|
||||
),
|
||||
],
|
||||
@@ -93,10 +94,17 @@ class MinePage extends GetView<MineController> {
|
||||
children: [
|
||||
Icon(Icons.shield_outlined, color: Colors.blue, size: 14),
|
||||
SizedBox(width: 4),
|
||||
Text('已认证', style: TextStyle(color: Colors.blue, fontSize: 10, fontWeight: FontWeight.bold)),
|
||||
Text(
|
||||
'已认证',
|
||||
style: TextStyle(
|
||||
color: Colors.blue,
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -138,7 +146,10 @@ class MinePage extends GetView<MineController> {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Text('驾驶得分', style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold)),
|
||||
const Text(
|
||||
'驾驶得分',
|
||||
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
||||
),
|
||||
const Text('本月表现', style: TextStyle(fontSize: 12, color: Colors.grey)),
|
||||
const SizedBox(height: 20),
|
||||
Center(
|
||||
@@ -179,7 +190,10 @@ class MinePage extends GetView<MineController> {
|
||||
padding: const EdgeInsets.only(top: 12.0),
|
||||
child: Row(
|
||||
children: [
|
||||
const Text('优秀驾驶员', style: TextStyle(fontSize: 14, fontWeight: FontWeight.w500)),
|
||||
const Text(
|
||||
'优秀驾驶员',
|
||||
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w500),
|
||||
),
|
||||
const Spacer(),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
|
||||
@@ -187,11 +201,14 @@ class MinePage extends GetView<MineController> {
|
||||
color: Colors.blue,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: const Text('A+', style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold)),
|
||||
)
|
||||
child: const Text(
|
||||
'A+',
|
||||
style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -199,7 +216,12 @@ class MinePage extends GetView<MineController> {
|
||||
}
|
||||
|
||||
// 驾驶得分卡片中的评分项
|
||||
Widget _buildScoreDetailRow(IconData icon, String title, String subtitle, bool isCompleted) {
|
||||
Widget _buildScoreDetailRow(
|
||||
IconData icon,
|
||||
String title,
|
||||
String subtitle,
|
||||
bool isCompleted,
|
||||
) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8.0),
|
||||
child: Row(
|
||||
@@ -214,13 +236,15 @@ class MinePage extends GetView<MineController> {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(title, style: const TextStyle(fontSize: 14, fontWeight: FontWeight.bold)),
|
||||
Text(
|
||||
title,
|
||||
style: const TextStyle(fontSize: 14, fontWeight: FontWeight.bold),
|
||||
),
|
||||
Text(subtitle, style: const TextStyle(fontSize: 12, color: Colors.grey)),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (isCompleted)
|
||||
const Icon(Icons.check_circle, color: Colors.blue),
|
||||
if (isCompleted) const Icon(Icons.check_circle, color: Colors.blue),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -236,7 +260,10 @@ class MinePage extends GetView<MineController> {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Text('本月记录', style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold)),
|
||||
const Text(
|
||||
'本月记录',
|
||||
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
_buildRecordRow(Icons.autorenew, '加氢预约践行率', '100%'),
|
||||
const Divider(),
|
||||
@@ -301,7 +328,9 @@ class MinePage extends GetView<MineController> {
|
||||
children: [
|
||||
Icon(icon, color: Colors.blue, size: 20),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(child: Text(text, style: const TextStyle(fontSize: 12, color: Colors.black54))),
|
||||
Expanded(
|
||||
child: Text(text, style: const TextStyle(fontSize: 12, color: Colors.black54)),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
@@ -319,7 +348,10 @@ class MinePage extends GetView<MineController> {
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(24)),
|
||||
elevation: 2,
|
||||
),
|
||||
child: const Text('退出登录', style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold)),
|
||||
child: const Text(
|
||||
'退出登录',
|
||||
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import 'package:ln_jq_app/storage_service.dart';
|
||||
|
||||
import '../../../common/styles/theme.dart';
|
||||
|
||||
class ReservationController extends GetxController with BaseControllerMixin {
|
||||
class C_ReservationController extends GetxController with BaseControllerMixin {
|
||||
@override
|
||||
String get builderId => 'reservation';
|
||||
|
||||
|
||||
@@ -8,13 +8,13 @@ import 'package:ln_jq_app/storage_service.dart';
|
||||
import 'controller.dart';
|
||||
|
||||
///加氢预约
|
||||
class ReservationPage extends GetView<ReservationController> {
|
||||
class ReservationPage extends GetView<C_ReservationController> {
|
||||
const ReservationPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Get.put(ReservationController());
|
||||
return GetBuilder<ReservationController>(
|
||||
Get.put(C_ReservationController());
|
||||
return GetBuilder<C_ReservationController>(
|
||||
id: 'reservation',
|
||||
builder: (_) {
|
||||
return Scaffold(
|
||||
@@ -24,7 +24,7 @@ class ReservationPage extends GetView<ReservationController> {
|
||||
FocusScope.of(context).unfocus();
|
||||
},
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
@@ -80,7 +80,7 @@ class ReservationPage extends GetView<ReservationController> {
|
||||
Widget _buildUserInfoCard() {
|
||||
return Card(
|
||||
elevation: 2, // 轻微的阴影
|
||||
shadowColor: Colors.black.withOpacity(0.1),
|
||||
margin: EdgeInsets.zero,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
||||
child: Column(
|
||||
children: [
|
||||
|
||||
Reference in New Issue
Block a user