Skip to content
Snippets Groups Projects
Commit 607b0823 authored by theilen's avatar theilen
Browse files

Fix loading Screen

parent 1cc8488c
Branches
No related tags found
1 merge request!6final project merge into main
......@@ -176,6 +176,9 @@ class _MyHomePageState extends State<MyHomePage> {
]);
_isLoading = false;
setState(() {
_isLoading;
});
}
// Add markers for origin/dest coords.
......@@ -256,7 +259,9 @@ class _MyHomePageState extends State<MyHomePage> {
if (_data.containsKey('error_code') && _data['error_code'] != 0) {
switch (_data['error_code']) {
case 1:
_showMessage('The address is outside the solution space. Please enter an address within Berlin-Brandenburg.', context);
_showMessage(
'The address is outside the solution space. Please enter an address within Berlin-Brandenburg.',
context);
return;
case 2:
_showMessage('The address could not be found.', context);
......@@ -267,7 +272,7 @@ class _MyHomePageState extends State<MyHomePage> {
var coordinates = _data['route'];
int duration = _data['duration'];
int distance = _data['distance'];
int daysAfterToday = _data['day_after_today'];
int daysAfterToday = _data['days_after_today'];
// Format duration, distance and day
_totalDuration = getTotalDuration(duration);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment