debug: settings reset
This commit is contained in:
parent
094078fe53
commit
7cbbcadb2a
3 changed files with 12 additions and 1 deletions
|
@ -24,6 +24,10 @@ class Settings {
|
|||
prefs = await SharedPreferences.getInstance();
|
||||
}
|
||||
|
||||
Future<void> reset() {
|
||||
return prefs.clear();
|
||||
}
|
||||
|
||||
void addListener(SettingsCallback listener) => _listeners.add(listener);
|
||||
|
||||
void removeListener(SettingsCallback listener) => _listeners.remove(listener);
|
||||
|
|
|
@ -6,7 +6,7 @@ class EmptyContent extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
const color = Color(0xFF607D8B);
|
||||
return Align(
|
||||
alignment: const FractionalOffset(.5, .3),
|
||||
alignment: const FractionalOffset(.5, .35),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: const [
|
||||
|
|
|
@ -48,6 +48,13 @@ class DebugPageState extends State<DebugPage> {
|
|||
padding: const EdgeInsets.all(8),
|
||||
children: [
|
||||
const Text('Settings'),
|
||||
RaisedButton(
|
||||
onPressed: () async {
|
||||
await settings.reset();
|
||||
setState(() {});
|
||||
},
|
||||
child: const Text('Reset settings'),
|
||||
),
|
||||
Text('collectionGroupFactor: ${settings.collectionGroupFactor}'),
|
||||
Text('collectionSortFactor: ${settings.collectionSortFactor}'),
|
||||
Text('infoMapZoom: ${settings.infoMapZoom}'),
|
||||
|
|
Loading…
Reference in a new issue