From c67c9cca0d92931dfa8d3e3390ff7e3517e17461 Mon Sep 17 00:00:00 2001 From: Dynesshely Date: Mon, 1 Apr 2024 00:55:41 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=A9=20Refactor:=20Settings=20page=20la?= =?UTF-8?q?yout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kitx_mobile/lib/pages/settings_page.dart | 82 +++++++++++++++--------- 1 file changed, 51 insertions(+), 31 deletions(-) diff --git a/kitx_mobile/lib/pages/settings_page.dart b/kitx_mobile/lib/pages/settings_page.dart index c66836b..9f4c458 100644 --- a/kitx_mobile/lib/pages/settings_page.dart +++ b/kitx_mobile/lib/pages/settings_page.dart @@ -145,8 +145,9 @@ class _SettingsPageState extends State { ), body: ListView( children: [ + const SizedBox(height: 30), Padding( - padding: EdgeInsets.symmetric(horizontal: 30, vertical: 30), + padding: EdgeInsets.symmetric(horizontal: 30, vertical: 5), child: ListTile( leading: const Icon(Icons.color_lens), title: Text('SettingsPage_Theme'.tr), @@ -155,7 +156,55 @@ class _SettingsPageState extends State { onTap: () => (() => Get.toNamed(ExteriorSettingsPage.getRoute())).tryVibrate().call(), ), ), - const Divider(), + Padding( + padding: EdgeInsets.symmetric(horizontal: 30, vertical: 5), + child: ListTile( + leading: const Icon(Icons.notes), + title: Text('Public_Log'.tr), + trailing: const Icon(Icons.keyboard_arrow_right), + shape: tileRadius, + onTap: () => (() => {}).tryVibrate().call(), + ), + ), + group( + SettingsGroupTitle(titleKey: 'Drawer_Test'.tr), + Column( + children: [ + Padding( + padding: EdgeInsets.symmetric(horizontal: 30, vertical: 5), + child: ListTile( + leading: const Icon(Icons.devices), + title: Text('Device Info'.tr), + trailing: const Icon(Icons.keyboard_arrow_right), + shape: tileRadius, + onTap: () => (() => Get.toNamed(DeviceInfoTestPage.getRoute())).tryVibrate().call(), + ), + ), + Padding( + padding: EdgeInsets.symmetric(horizontal: 30, vertical: 5), + child: ListTile( + leading: const Icon(Icons.sensors), + title: Text('Device Sensors'.tr), + trailing: const Icon(Icons.keyboard_arrow_right), + shape: tileRadius, + onTap: () => (() => Get.toNamed(DeviceSensorsPage.getRoute())).tryVibrate().call(), + ), + ), + Padding( + padding: EdgeInsets.symmetric(horizontal: 30, vertical: 5), + child: ListTile( + leading: const Icon(Icons.wifi), + title: Text('Network Info'.tr), + trailing: const Icon(Icons.keyboard_arrow_right), + shape: tileRadius, + onTap: () => (() => Get.toNamed(NetworkInfoTestPage.getRoute())).tryVibrate().call(), + ), + ), + ], + ), + const SizedBox(), + spacer: null, + ), // group( // SettingsGroupTitle(titleKey: 'Public_Log'), // Column( @@ -228,35 +277,6 @@ class _SettingsPageState extends State { // const SettingsGroupDivider(), // spacer: null, // ), - group( - SettingsGroupTitle(titleKey: 'Drawer_Test'.tr), - Container( - margin: EdgeInsets.symmetric(horizontal: 20), - child: Wrap( - alignment: WrapAlignment.center, - spacing: 8.0, - runSpacing: 4.0, - children: [ - ElevatedButton.icon( - onPressed: () => Get.toNamed(DeviceInfoTestPage.getRoute()), - icon: const Icon(Icons.devices), - label: const Text('Device Info'), - ), - ElevatedButton.icon( - onPressed: () => Get.toNamed(DeviceSensorsPage.getRoute()), - icon: const Icon(Icons.sensors), - label: const Text('Device Sensors'), - ), - ElevatedButton.icon( - onPressed: () => Get.toNamed(NetworkInfoTestPage.getRoute()), - icon: const Icon(Icons.wifi), - label: const Text('Network Info'), - ), - ], - ), - ), - const SettingsGroupDivider(), - ), const SizedBox(height: 300), ], ),