ui improvements for trips and landmarks
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user