Update advanced settings
This commit is contained in:
parent
3a5b90e3b9
commit
e243aacde7
2 changed files with 16 additions and 21 deletions
|
|
@ -21,8 +21,8 @@
|
||||||
"preventSuspendLabel": "Prevent suspend",
|
"preventSuspendLabel": "Prevent suspend",
|
||||||
"disableElasticityLabel": "Disable elasticity",
|
"disableElasticityLabel": "Disable elasticity",
|
||||||
"stopDetectionLabel": "Stop detection",
|
"stopDetectionLabel": "Stop detection",
|
||||||
"advancedLabel": "Show advanced settings",
|
|
||||||
"trackingLabel": "Continuous tracking",
|
"trackingLabel": "Continuous tracking",
|
||||||
|
"advancedLabel": "Advanced settings",
|
||||||
"startAction": "Start service",
|
"startAction": "Start service",
|
||||||
"stopAction": "Stop service",
|
"stopAction": "Stop service",
|
||||||
"sosAction": "Send SOS"
|
"sosAction": "Send SOS"
|
||||||
|
|
|
||||||
|
|
@ -133,20 +133,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(title: Text(AppLocalizations.of(context)!.settingsTitle)),
|
||||||
title: Text(AppLocalizations.of(context)!.settingsTitle),
|
|
||||||
actions: [
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Text(AppLocalizations.of(context)!.advancedLabel),
|
|
||||||
Switch(
|
|
||||||
value: advanced,
|
|
||||||
onChanged: (value) => setState(() => advanced = value),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
body: ListView(
|
body: ListView(
|
||||||
children: [
|
children: [
|
||||||
_buildListTile(AppLocalizations.of(context)!.idLabel, Preferences.id, false),
|
_buildListTile(AppLocalizations.of(context)!.idLabel, Preferences.id, false),
|
||||||
|
|
@ -156,6 +143,14 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||||
if (Platform.isAndroid && Preferences.instance.getInt(Preferences.distance) == 0)
|
if (Platform.isAndroid && Preferences.instance.getInt(Preferences.distance) == 0)
|
||||||
_buildListTile(AppLocalizations.of(context)!.intervalLabel, Preferences.interval, true),
|
_buildListTile(AppLocalizations.of(context)!.intervalLabel, Preferences.interval, true),
|
||||||
_buildListTile(AppLocalizations.of(context)!.heartbeatLabel, Preferences.heartbeat, true),
|
_buildListTile(AppLocalizations.of(context)!.heartbeatLabel, Preferences.heartbeat, true),
|
||||||
|
SwitchListTile(
|
||||||
|
title: Text(AppLocalizations.of(context)!.advancedLabel),
|
||||||
|
value: advanced,
|
||||||
|
onChanged: (value) {
|
||||||
|
setState(() => advanced = value);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
if (advanced)
|
||||||
SwitchListTile(
|
SwitchListTile(
|
||||||
title: Text(AppLocalizations.of(context)!.bufferLabel),
|
title: Text(AppLocalizations.of(context)!.bufferLabel),
|
||||||
value: buffering,
|
value: buffering,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue