ui improvements for trips and landmarks
All checks were successful
Build and push docker image / Build (pull_request) Successful in 1m48s
Build and release APK / Build APK (pull_request) Successful in 4m51s

This commit is contained in:
2024-08-05 10:18:00 +02:00
parent c87a01b2e8
commit 71d9554d97
12 changed files with 237 additions and 217 deletions

View File

@@ -2,6 +2,7 @@ import 'package:anyway/structs/preferences.dart';
import 'package:flutter/material.dart';
bool debugMode = false;
class ProfilePage extends StatefulWidget {
@override
@@ -12,6 +13,27 @@ class _ProfilePageState extends State<ProfilePage> {
Future<UserPreferences> _prefs = loadUserPreferences();
Widget debugButton() {
return Padding(
padding: EdgeInsets.only(top: 20),
child: Row(
children: [
Text('Debug mode'),
Switch(
value: debugMode,
onChanged: (bool? newValue) {
setState(() {
debugMode = newValue!;
});
}
)
],
)
);
}
@override
Widget build(BuildContext context) {
return ListView(
@@ -36,7 +58,8 @@ class _ProfilePageState extends State<ProfilePage> {
),
),
FutureBuilder(future: _prefs, builder: futureSliders)
FutureBuilder(future: _prefs, builder: futureSliders),
debugButton()
]
);
}
@@ -59,7 +82,6 @@ class _ProfilePageState extends State<ProfilePage> {
}
class PreferenceSliders extends StatefulWidget {
final List<SinglePreference> prefs;