导航栏
This commit is contained in:
@@ -26,7 +26,7 @@ class CarInfoPage extends GetView<CarInfoController> {
|
||||
children: [
|
||||
_buildUserInfoCard(),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 20.w,right: 20.w),
|
||||
padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
@@ -35,6 +35,7 @@ class CarInfoPage extends GetView<CarInfoController> {
|
||||
_buildCertificatesCard(context),
|
||||
const SizedBox(height: 12),
|
||||
_buildSafetyReminderCard(),
|
||||
SizedBox(height: 95.h),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -60,7 +61,7 @@ class CarInfoPage extends GetView<CarInfoController> {
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 20.w, right: 20.w, bottom: 16, top: 40),
|
||||
padding: EdgeInsets.only(left: 20.w, right: 20.w, bottom: 16, top: 50),
|
||||
child: Row(
|
||||
children: [
|
||||
Stack(
|
||||
@@ -344,7 +345,7 @@ class CarInfoPage extends GetView<CarInfoController> {
|
||||
),
|
||||
const SizedBox(height: 9),
|
||||
SizedBox(
|
||||
height: 343.h, // 给定一个高度,或者使用别的方式布局
|
||||
height: 333.h, // 给定一个高度,或者使用别的方式布局
|
||||
child: TabBarView(
|
||||
children: [
|
||||
_buildCertificateContent('行驶证', controller.drivingAttachments),
|
||||
@@ -362,66 +363,55 @@ class CarInfoPage extends GetView<CarInfoController> {
|
||||
/// 构建单个证件的展示内容
|
||||
Widget _buildCertificateContent(String title, RxList<String> attachments) {
|
||||
return Obx(() {
|
||||
if (attachments.isEmpty) {
|
||||
return const Center(child: Text('暂无相关证件信息'));
|
||||
}
|
||||
return Card(
|
||||
elevation: 0,
|
||||
color: Colors.white,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
_buildCertDetailItem('所有人', '上海羚牛氢运物联网科技有限公司', isFull: true),
|
||||
_buildCertDetailItem('车辆识别代号', controller.vin),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
_buildCertDetailItem(
|
||||
'有效期至',
|
||||
'2028-08-14',
|
||||
valueColor: const Color(0xFF52C41A),
|
||||
),
|
||||
_buildCertDetailItem('使用性质', '货运'),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
// 附件预览部分
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
scrollDirection: Axis.vertical,
|
||||
itemCount: attachments.length,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
itemBuilder: (context, index) {
|
||||
final url = attachments[index];
|
||||
return GestureDetector(
|
||||
padding: EdgeInsets.all(16.0),
|
||||
child: attachments.isEmpty
|
||||
? const Center(child: Text('暂无相关证件信息'))
|
||||
: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
_buildCertDetailItem('所有人', '上海羚牛氢运物联网科技有限公司', isFull: true),
|
||||
_buildCertDetailItem('车辆识别代号', controller.vin),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
_buildCertDetailItem(
|
||||
'有效期至',
|
||||
'2028-08-14',
|
||||
valueColor: const Color(0xFF52C41A),
|
||||
),
|
||||
_buildCertDetailItem('使用性质', '货运'),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
// 附件预览部分
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
controller.openAttachment(url);
|
||||
controller.navigateToCertificateViewer(title, attachments);
|
||||
},
|
||||
child: Container(
|
||||
height: 184.h,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
border: Border.all(color: Color.fromRGBO(226, 232, 240, 1)),
|
||||
color: Color.fromRGBO(248, 250, 252, 1)
|
||||
color: Color.fromRGBO(248, 250, 252, 1),
|
||||
),
|
||||
child: Center(child: _buildAttachmentPreview(url)),
|
||||
child: Center(child: _buildAttachmentPreview(attachments[0])),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user