Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Navigation App
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
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
SWP Datenverwaltung Navigation 2023
Navigation App
Commits
2fba5d69
Commit
2fba5d69
authored
2 years ago
by
theilen
Browse files
Options
Downloads
Patches
Plain Diff
Update main.dart
parent
e13629cc
Branches
Branches containing commit
No related tags found
1 merge request
!6
final project merge into main
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/main.dart
+7
-7
7 additions, 7 deletions
lib/main.dart
with
7 additions
and
7 deletions
lib/main.dart
+
7
−
7
View file @
2fba5d69
...
...
@@ -231,12 +231,12 @@ class _MyHomePageState extends State<MyHomePage> {
var
coordinates
=
_data
[
'route'
];
int
duration
=
_data
[
'duration'
];
int
distance
=
_data
[
'distance'
];
int
daysAfterToday
=
_data
[
'day
s
_after_today'
];
int
daysAfterToday
=
_data
[
'day_after_today'
];
// Format duration, distance and day
_totalDuration
=
getTotalDuration
(
duration
);
_totalDistance
=
getTotalDistance
(
distance
);
_totalDaysFormatted
=
get
Total
Day
s
(
daysAfterToday
);
_totalDaysFormatted
=
getDay
(
daysAfterToday
);
// Draw polyline
drawPolyline
(
coordinates
);
...
...
@@ -287,11 +287,11 @@ class _MyHomePageState extends State<MyHomePage> {
return
'
$distanceInKm
km'
;
}
String
get
Total
Day
s
(
int
daysAfterToday
)
{
String
currentDate
=
convertDateFormat
(
DateTime
.
now
()
)
;
String
lastDate
=
convertDateFormat
(
DateTime
.
now
()
.
add
(
Duration
(
days:
daysAfterToday
))
);
return
"
$currentDate
-
$lastD
ate
"
;
String
getDay
(
int
daysAfterToday
)
{
DateTime
today
=
DateTime
.
now
();
String
date
=
convertDateFormat
(
today
.
add
(
Duration
(
days:
daysAfterToday
)));
print
(
date
);
return
d
ate
;
}
List
<
String
>
getForbidden
()
{
...
...
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