feat(apps): establish shared mobile design system

This commit is contained in:
2026-08-10 23:31:44 +08:00
parent 7242048abf
commit a2383fc8a1
34 changed files with 2007 additions and 751 deletions

View File

@@ -58,28 +58,37 @@ class _HomePageState extends State<HomePage> {
title: '今天也要安心用气',
description: '设备控制能力尚未开放,本页只展示真实服务与安全内容。',
),
Card(
margin: const EdgeInsets.symmetric(horizontal: 16),
child: Padding(
padding: const EdgeInsets.all(20),
AppGutter(
child: SurfaceSection(
child: Row(
children: [
Icon(
Icons.store_mall_directory_outlined,
size: 38,
color: Theme.of(context).colorScheme.primary,
Container(
width: 52,
height: 52,
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.primaryContainer,
borderRadius: BorderRadius.circular(16),
),
child: Icon(
Icons.store_mall_directory_outlined,
color: Theme.of(context).colorScheme.primary,
semanticLabel: '服务归属',
),
),
const SizedBox(width: 14),
const SizedBox(width: 16),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text('当前服务归属', style: TextStyle(fontWeight: FontWeight.w800)),
Text('当前服务归属', style: Theme.of(context).textTheme.titleMedium),
const SizedBox(height: 4),
Text(
relation == null
? '尚未建立服务关系'
: '${relation['gas_name'] ?? ''} ${relation['delivery_name'] ?? ''}',
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
),
],
),
@@ -88,17 +97,30 @@ class _HomePageState extends State<HomePage> {
),
),
),
const Padding(
padding: EdgeInsets.fromLTRB(20, 26, 20, 8),
child: Text('安全公告', style: TextStyle(fontWeight: FontWeight.w800, fontSize: 18)),
const SizedBox(height: 32),
const AppGutter(
child: SectionHeader(title: '安全公告', description: '来自平台的最新安全提醒与服务信息'),
),
const SizedBox(height: 12),
if (contents.isEmpty)
const Padding(
padding: EdgeInsets.all(20),
child: Text('暂无已发布内容'),
const AppGutter(
child: SurfaceSection(child: Text('暂无已发布内容')),
)
else
...contents.take(6).map((item) => RecordCard(record: item)),
AppGutter(
child: SurfaceSection(
padding: EdgeInsets.zero,
child: Column(
children: [
for (var index = 0; index < contents.take(6).length; index++) ...[
RecordCard(record: contents[index]),
if (index < contents.take(6).length - 1)
const Divider(indent: 16, endIndent: 16),
],
],
),
),
),
],
),
);