Skip to content
Snippets Groups Projects
Commit 489931bf authored by Maximilian Betz's avatar Maximilian Betz
Browse files

allow modification of lat long and elevation fields

parent c91da2a7
No related branches found
No related tags found
No related merge requests found
......@@ -41,9 +41,9 @@ class _AddEventPageState extends State<AddEvent> {
if (syncGNSSData == true) {
if(mounted){
setState(() {
//refresh UI on update
});}
setState(() {
//refresh UI on update
});}
};
});
}
......@@ -72,9 +72,9 @@ class _AddEventPageState extends State<AddEvent> {
if(hasPermission){
debugPrint('Location permissions granted');
if(mounted){
setState(() {
//refresh the UI
});};
setState(() {
//refresh the UI
});};
getLocation();
}
......@@ -82,9 +82,9 @@ class _AddEventPageState extends State<AddEvent> {
debugPrint("GPS Service is not enabled, turn on GPS location");
}
if(mounted){
setState(() {
//refresh the UI
});}
setState(() {
//refresh the UI
});}
}
@override
......@@ -99,15 +99,15 @@ class _AddEventPageState extends State<AddEvent> {
currentEvent.store.status = "PENDING";
storedEvents.store.add(
Event(
currentEvent.store.id,
currentEvent.store.urn,
currentEvent.store.label,
currentEvent.store.type,
currentEvent.store.description,
currentEvent.store.status,
currentEvent.store.latitude,
currentEvent.store.longitude,
currentEvent.store.elevation
currentEvent.store.id,
currentEvent.store.urn,
currentEvent.store.label,
currentEvent.store.type,
currentEvent.store.description,
currentEvent.store.status,
currentEvent.store.latitude,
currentEvent.store.longitude,
currentEvent.store.elevation
));
}
......@@ -130,7 +130,7 @@ class _AddEventPageState extends State<AddEvent> {
if(accuracy == 0.0){
gnssStatusText = "No-Fix";
}
}
else{
gnssStatusText = "Precision: "+ accuracy.toStringAsFixed(2) +"m";
}
......@@ -196,33 +196,42 @@ class _AddEventPageState extends State<AddEvent> {
currentEvent.store.description = value;
},
),
TextField(
readOnly: false,
enabled: !syncGNSSData,
//controller: _controllerLat,
controller: TextEditingController(text: currentEvent.store.latitude.toString()),
decoration: const InputDecoration(
labelText: 'Latitude',
border: OutlineInputBorder(),
),
TextFormField(
readOnly: false,
enabled: !syncGNSSData,
controller: TextEditingController(text: currentEvent.store.latitude.toString()),
decoration: const InputDecoration(
labelText: 'Latitude',
border: OutlineInputBorder(),
),
onChanged: (value) {
currentEvent.store.latitude = value;
}
),
TextField(
readOnly: false,
enabled: !syncGNSSData,
controller: TextEditingController(text: currentEvent.store.longitude.toString()),
decoration: const InputDecoration(
labelText: 'Longitude',
border: OutlineInputBorder(),
),
TextFormField(
readOnly: false,
enabled: !syncGNSSData,
controller: TextEditingController(text: currentEvent.store.longitude.toString()),
decoration: const InputDecoration(
labelText: 'Longitude',
border: OutlineInputBorder(),
),
onChanged: (value) {
currentEvent.store.longitude = value;
}
),
TextField(
readOnly: false,
enabled: !syncGNSSData,
controller: TextEditingController(text: currentEvent.store.elevation.toString()),
decoration: const InputDecoration(
labelText: 'Elevation',
border: OutlineInputBorder(),
),
TextFormField(
readOnly: false,
enabled: !syncGNSSData,
controller: TextEditingController(text: currentEvent.store.elevation.toString()),
decoration: const InputDecoration(
labelText: 'Elevation',
border: OutlineInputBorder(),
),
onChanged: (value) {
currentEvent.store.elevation = value;
}
),
]),
bottomNavigationBar: Row(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment