fix(ui): 修复首页顶部标题遮挡同步按钮的问题,优化AppBar布局
This commit is contained in:
@@ -30,6 +30,7 @@ class AeroTrackApp extends StatelessWidget {
|
||||
backgroundColor: Colors.white,
|
||||
foregroundColor: Color(0xFF0F172A),
|
||||
elevation: 0,
|
||||
centerTitle: false,
|
||||
),
|
||||
),
|
||||
home: HomeScreen(storageService: storageService),
|
||||
|
||||
@@ -226,7 +226,10 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
elevation: 0,
|
||||
centerTitle: false,
|
||||
titleSpacing: 16,
|
||||
title: const Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(Icons.air, color: Color(0xFF2563EB), size: 24),
|
||||
SizedBox(width: 8),
|
||||
@@ -244,6 +247,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
IconButton(
|
||||
icon: const Icon(Icons.sync, color: Color(0xFF2563EB)),
|
||||
tooltip: '局域网同步',
|
||||
visualDensity: VisualDensity.compact,
|
||||
onPressed: () async {
|
||||
await Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
@@ -253,14 +257,10 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
_loadData();
|
||||
},
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.tune, color: Color(0xFF475569)),
|
||||
tooltip: '配置用药方案',
|
||||
onPressed: _openPlanConfig,
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.history, color: Color(0xFF475569)),
|
||||
tooltip: '历史记录',
|
||||
visualDensity: VisualDensity.compact,
|
||||
onPressed: () async {
|
||||
await Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
@@ -273,6 +273,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
IconButton(
|
||||
icon: const Icon(Icons.settings_outlined, color: Color(0xFF475569)),
|
||||
tooltip: '系统设置',
|
||||
visualDensity: VisualDensity.compact,
|
||||
onPressed: () async {
|
||||
await Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
@@ -282,6 +283,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
_loadData();
|
||||
},
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
],
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
|
||||
Reference in New Issue
Block a user