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

expanded Now Button to parent size

parent 553b7cf7
No related branches found
No related tags found
No related merge requests found
......@@ -60,7 +60,6 @@ Text: #57827E
# Add Event
- Show \* next to lable for required fields.
- NOW button Equal distance to edge and textfield. Same hight as textfield.
- 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.
......
......@@ -367,36 +367,43 @@ class _AddEventPageState extends State<AddEvent> {
),
const SizedBox(height: 15.0),
Row(
mainAxisSize: MainAxisSize.max,
//mainAxisSize: MainAxisSize.max,
//crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Flexible(child:
TextFormField(
controller: TextEditingController(
text: eventStore.currentEvent.startDate.substring(0, 19) + 'Z' //Do not show microseconds
Flexible(
child:
TextFormField(
controller: TextEditingController(
text: eventStore.currentEvent.startDate.substring(0, 19) + 'Z' //Do not show microseconds
),
readOnly: true,
decoration: const InputDecoration(
labelText: 'Timestamp',
//helperText: '', //Adds some space below field
border: OutlineInputBorder(),
),
onTap: () {
//TODO: only open if GNSS sync is disabled.
DatePicker.showDateTimePicker(context,
showTitleActions: true,
onConfirm: (date) {
//Only one field for start and end date.
var isoDate = date.toIso8601String();
eventStore.currentEvent.startDate = isoDate;
eventStore.currentEvent.endDate = isoDate;
debugPrint('Date set to : $isoDate');
setState(() {});
},
currentTime: DateTime.now().toUtc(),
locale: LocaleType.en);
},
),
readOnly: true,
decoration: const InputDecoration(
labelText: 'Timestamp',
//helperText: '', //Adds some space below field
border: OutlineInputBorder(),
),
onTap: () {
DatePicker.showDateTimePicker(context,
showTitleActions: true,
onConfirm: (date) {
//Only one field for start and end date.
var isoDate = date.toIso8601String();
eventStore.currentEvent.startDate = isoDate;
eventStore.currentEvent.endDate = isoDate;
debugPrint('Date set to : $isoDate');
setState(() {});
},
currentTime: DateTime.now().toUtc(),
locale: LocaleType.en);
},
),
),
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
),
onPressed: () {
var date = DateTime.now().toUtc();
var isoDate = date.toIso8601String();
......
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