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

Moved GNSS Switch and GNSS information text above 'Label' field

parent b43f24bc
No related branches found
No related tags found
No related merge requests found
......@@ -60,12 +60,9 @@ Text: #57827E
# Add Event
- Show \* next to lable for required fields.
- GNSS Switch above 'Label' field or in TopMenuBar? The current position is suboptimal as sometimes clicked when adding a event is desired.
- Precision, No-Fix, GNSS-deactivated : alligned left
- Event Type /URN Item separation and hightlighting chosen type as in configuration.
- Is a field for end time required here?
# View & Events
- "All Events" "Pending Events" on first line above table. Alligned right. 50pix hight distance to table start.
- Multiple lines for one event to reduce width. Alternative: Do not show all event details in table but show them in a separate widget on selection. This could also be the view to edit event details.
......
......@@ -262,11 +262,11 @@ class _AddEventPageState extends State<AddEvent> {
gnssStatusText = "No-Fix";
}
else{
gnssStatusText = "Precision: "+ accuracy.toStringAsFixed(2) +"m";
gnssStatusText = "Precision "+ accuracy.toStringAsFixed(1) +"m";
}
}
else{
gnssStatusText = "GNSS Disabled"; // Just display existing event coordinates
gnssStatusText = "Disabled"; // Just display existing event coordinates
}
if (configuration.initialized == true) {
......@@ -279,7 +279,27 @@ class _AddEventPageState extends State<AddEvent> {
Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
const SizedBox(height: 15.0),
const SizedBox(height: 5.0),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
const Text('Coordinate via GNSS: '),
Text(gnssStatusText),
//Text(gnssStatusText),
const SizedBox(width: 10),
Switch(
value: eventStore.gnssSync,
onChanged: (value) {
eventStore.gnssSync = value;
debugPrint('Switched to:' + eventStore.gnssSync.toString());
setState(() {
//refresh the UI
});
},
),
],
),
const SizedBox(height: 10.0),
TextFormField(
initialValue: eventStore.currentEvent.label,
autovalidateMode: AutovalidateMode.always,
......@@ -402,7 +422,7 @@ class _AddEventPageState extends State<AddEvent> {
const SizedBox(width: 5),
ElevatedButton(
style: ElevatedButton.styleFrom(
padding: const EdgeInsets.symmetric(vertical: 20.0), //TODO: find a more dynamic solution without a fixed value
padding: const EdgeInsets.symmetric(vertical: 20.0), //TODO: find a more dynamic solution without a fixed value
),
onPressed: () {
var date = DateTime.now().toUtc();
......@@ -520,22 +540,10 @@ class _AddEventPageState extends State<AddEvent> {
),
),
),
bottomNavigationBar: Row(
bottomNavigationBar:
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Text(gnssStatusText),
const SizedBox(width: 10),
Switch(
value: eventStore.gnssSync,
onChanged: (value) {
eventStore.gnssSync = value;
debugPrint('Switched to:' + eventStore.gnssSync.toString());
setState(() {
//refresh the UI
});
},
),
const SizedBox(width: 50),
Container(
margin: const EdgeInsets.symmetric(vertical: 10.0),
child: _addButtonStatus() ?
......@@ -548,7 +556,7 @@ class _AddEventPageState extends State<AddEvent> {
}
setState(() {});
},
tooltip: 'Add Event',
tooltip: 'Create Event',
child: const Icon(Icons.check),
) :
FloatingActionButton(
......
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