Skip to content

Commit

Permalink
🧩 Refactor: Settings page layout
Browse files Browse the repository at this point in the history
  • Loading branch information
Dynesshely committed Mar 31, 2024
1 parent b7836d0 commit c67c9cc
Showing 1 changed file with 51 additions and 31 deletions.
82 changes: 51 additions & 31 deletions kitx_mobile/lib/pages/settings_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,9 @@ class _SettingsPageState extends State<SettingsPage> {
),
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),
Expand All @@ -155,7 +156,55 @@ class _SettingsPageState extends State<SettingsPage> {
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(
Expand Down Expand Up @@ -228,35 +277,6 @@ class _SettingsPageState extends State<SettingsPage> {
// 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),
],
),
Expand Down

0 comments on commit c67c9cc

Please sign in to comment.