2026-05-19 08:46:35 +08:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
class QuickEntryCard extends StatelessWidget {
|
|
|
|
|
const QuickEntryCard({super.key});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
const Text(
|
|
|
|
|
'快捷入口',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
color: Color(0xFF1D2129),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
const Icon(
|
|
|
|
|
Icons.arrow_forward_ios,
|
|
|
|
|
size: 16,
|
|
|
|
|
color: Color(0xFF86909C),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(height: 12),
|
2026-05-25 12:58:29 +08:00
|
|
|
SizedBox(
|
|
|
|
|
height: 85,
|
|
|
|
|
child: ListView(
|
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
|
physics: const BouncingScrollPhysics(),
|
|
|
|
|
padding: const EdgeInsets.only(right: 16),
|
2026-05-19 08:46:35 +08:00
|
|
|
children: [
|
2026-05-25 12:58:29 +08:00
|
|
|
_buildQuickEntryCard(
|
2026-05-19 08:46:35 +08:00
|
|
|
icon: Icons.upload_file,
|
|
|
|
|
label: '设备上报',
|
|
|
|
|
),
|
2026-05-25 12:58:29 +08:00
|
|
|
const SizedBox(width: 8),
|
|
|
|
|
_buildQuickEntryCard(
|
2026-05-19 08:46:35 +08:00
|
|
|
icon: Icons.qr_code_scanner,
|
|
|
|
|
label: '扫一扫',
|
|
|
|
|
),
|
2026-05-25 12:58:29 +08:00
|
|
|
const SizedBox(width: 8),
|
|
|
|
|
_buildQuickEntryCard(
|
2026-05-19 08:46:35 +08:00
|
|
|
icon: Icons.assignment,
|
|
|
|
|
label: '工单任务',
|
|
|
|
|
),
|
2026-05-25 12:58:29 +08:00
|
|
|
const SizedBox(width: 8),
|
|
|
|
|
_buildQuickEntryCard(
|
2026-05-19 08:46:35 +08:00
|
|
|
icon: Icons.notifications_active,
|
|
|
|
|
label: '告警中心',
|
|
|
|
|
),
|
2026-05-25 12:58:29 +08:00
|
|
|
const SizedBox(width: 8),
|
|
|
|
|
_buildQuickEntryCard(
|
|
|
|
|
icon: Icons.map,
|
|
|
|
|
label: '电厂地图',
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(width: 8),
|
|
|
|
|
_buildQuickEntryCard(
|
|
|
|
|
icon: Icons.devices,
|
|
|
|
|
label: '设备列表',
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(width: 8),
|
2026-05-19 08:46:35 +08:00
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-25 12:58:29 +08:00
|
|
|
Widget _buildQuickEntryCard({
|
2026-05-19 08:46:35 +08:00
|
|
|
required IconData icon,
|
|
|
|
|
required String label,
|
|
|
|
|
}) {
|
|
|
|
|
return InkWell(
|
|
|
|
|
onTap: () => print('点击:$label'),
|
2026-05-25 12:58:29 +08:00
|
|
|
borderRadius: BorderRadius.circular(12),
|
|
|
|
|
child: SizedBox(
|
|
|
|
|
width: 85,
|
|
|
|
|
height: 85,
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: const EdgeInsets.all(10),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.circular(12),
|
|
|
|
|
boxShadow: const [
|
|
|
|
|
BoxShadow(
|
|
|
|
|
color: Color(0x0D000000),
|
|
|
|
|
blurRadius: 4,
|
|
|
|
|
offset: Offset(0, 2),
|
|
|
|
|
),
|
|
|
|
|
],
|
2026-05-19 08:46:35 +08:00
|
|
|
),
|
2026-05-25 12:58:29 +08:00
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
Icon(
|
|
|
|
|
icon,
|
|
|
|
|
color: const Color(0xFF165DFF),
|
|
|
|
|
size: 26,
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(height: 6),
|
|
|
|
|
Text(
|
|
|
|
|
label,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
style: const TextStyle(
|
|
|
|
|
color: Color(0xFF4E5969),
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
height: 1.2,
|
|
|
|
|
),
|
|
|
|
|
maxLines: 1,
|
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
|
),
|
|
|
|
|
],
|
2026-05-19 08:46:35 +08:00
|
|
|
),
|
2026-05-25 12:58:29 +08:00
|
|
|
),
|
2026-05-19 08:46:35 +08:00
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|