Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MobileEventLog
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Data-Logistics-Support
MobileEventLog
Commits
450cf339
Commit
450cf339
authored
3 years ago
by
Maximilian Betz
Browse files
Options
Downloads
Patches
Plain Diff
some more ui improvements
parent
2c04e441
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/addevent.dart
+17
-7
17 additions, 7 deletions
lib/addevent.dart
with
17 additions
and
7 deletions
lib/addevent.dart
+
17
−
7
View file @
450cf339
...
...
@@ -95,9 +95,7 @@ class _AddEventPageState extends State<AddEvent> {
}
catch
(
e
){
debugPrint
(
'Canceling location stream failed'
);
}
super
.
dispose
();
//TODO: only if initialized positionStream.cancel();
}
void
_storeCurrentEvent
()
{
...
...
@@ -120,7 +118,6 @@ class _AddEventPageState extends State<AddEvent> {
}
//TODO: add field validators for freetext fields. Check allowed characters in sensor.awi.de
@override
Widget
build
(
BuildContext
context
)
{
/* Get singletons to access relevant data here.*/
...
...
@@ -128,7 +125,6 @@ class _AddEventPageState extends State<AddEvent> {
final
ConfigurationStoreInstance
configuration
=
ConfigurationStoreInstance
();
String
gnssStatusText
=
""
;
if
(
true
==
syncGNSSData
){
// Update current event coordinates from GNSS stream
eventsStore
.
currentEvent
.
latitude
=
lat
;
...
...
@@ -153,14 +149,16 @@ class _AddEventPageState extends State<AddEvent> {
if
(
configuration
.
initialized
==
true
)
{
return
Scaffold
(
appBar:
AppBar
(
title:
const
Text
(
"Add Event"
)),
body:
body:
SingleChildScrollView
(
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
spaceEvenly
,
children:
<
Widget
>[
const
SizedBox
(
height:
10.0
),
TextFormField
(
initialValue:
eventsStore
.
currentEvent
.
label
,
autovalidateMode:
AutovalidateMode
.
onUserInteraction
,
decoration:
const
InputDecoration
(
border:
OutlineInputBorder
(),
labelText:
'Label'
,
errorText:
'Only: a-z , A-Z , _ , 0-9 , ,(Comma) , ( , ) , + , - , . , :'
),
...
...
@@ -177,10 +175,12 @@ class _AddEventPageState extends State<AddEvent> {
}
},
),
const
SizedBox
(
height:
10.0
),
DropdownButtonFormField
(
value:
eventsStore
.
currentEvent
.
type
,
isExpanded:
true
,
decoration:
const
InputDecoration
(
border:
OutlineInputBorder
(),
labelText:
'Event Type'
,
),
items:
...
...
@@ -194,10 +194,12 @@ class _AddEventPageState extends State<AddEvent> {
eventsStore
.
currentEvent
.
type
=
value
.
toString
();
}
),
const
SizedBox
(
height:
10.0
),
DropdownButtonFormField
(
value:
eventsStore
.
currentEvent
.
urn
,
isExpanded:
true
,
decoration:
const
InputDecoration
(
border:
OutlineInputBorder
(),
labelText:
'URN'
,
),
items:
...
...
@@ -213,18 +215,22 @@ class _AddEventPageState extends State<AddEvent> {
configuration
.
getDeviceIdFromUrn
(
value
.
toString
());
}
),
const
SizedBox
(
height:
10.0
),
TextFormField
(
minLines:
3
,
maxLines:
3
,
initialValue:
eventsStore
.
currentEvent
.
description
,
decoration:
const
InputDecoration
(
border:
OutlineInputBorder
(),
labelText:
'Description'
),
onChanged:
(
value
)
{
eventsStore
.
currentEvent
.
description
=
value
;
},
),
const
SizedBox
(
height:
10.0
),
Row
(
mainAxisSize:
MainAxisSize
.
m
in
,
mainAxisSize:
MainAxisSize
.
m
ax
,
children:
<
Widget
>[
Flexible
(
child:
TextFormField
(
...
...
@@ -264,6 +270,7 @@ class _AddEventPageState extends State<AddEvent> {
),
]
),
const
SizedBox
(
height:
10.0
),
TextFormField
(
readOnly:
false
,
enabled:
!
syncGNSSData
,
...
...
@@ -277,6 +284,7 @@ class _AddEventPageState extends State<AddEvent> {
eventsStore
.
currentEvent
.
latitude
=
value
;
}
),
const
SizedBox
(
height:
10.0
),
TextFormField
(
readOnly:
false
,
enabled:
!
syncGNSSData
,
...
...
@@ -291,6 +299,7 @@ class _AddEventPageState extends State<AddEvent> {
eventsStore
.
currentEvent
.
longitude
=
value
;
}
),
const
SizedBox
(
height:
10.0
),
TextFormField
(
readOnly:
false
,
enabled:
!
syncGNSSData
,
...
...
@@ -305,6 +314,7 @@ class _AddEventPageState extends State<AddEvent> {
}
),
]),
),
bottomNavigationBar:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
end
,
children:
[
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment