Skip to content

Commit

Permalink
Bad visual experience during rerouting (#41)
Browse files Browse the repository at this point in the history
Signed-off-by: Tadeusz Staszak <[email protected]>
  • Loading branch information
tstaszak89 authored Jan 5, 2022
1 parent 7948a23 commit 22ed9ad
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/navigation/navigation_screen.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2021 HERE Europe B.V.
* Copyright (C) 2020-2022 HERE Europe B.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -464,14 +464,12 @@ class _NavigationScreenState extends State<NavigationScreen> with WidgetsBinding
}

PreferredSize? _buildTopBar(BuildContext context) {
if (_currentManeuverIndex == null && !_reroutingInProgress) {
if (!_navigationStarted) {
return null;
}

ColorScheme colorScheme = Theme.of(context).colorScheme;
Widget child;

if (_reroutingInProgress) {
if (_reroutingInProgress || _currentManeuverIndex == null) {
child = ReroutingIndicator();
} else {
Routing.Maneuver? maneuver = _visualNavigator.getManeuver(_currentManeuverIndex!);
Expand All @@ -491,7 +489,7 @@ class _NavigationScreenState extends State<NavigationScreen> with WidgetsBinding
child: AppBar(
shape: UIStyle.bottomRoundedBorder(),
automaticallyImplyLeading: false,
backgroundColor: colorScheme.secondary,
backgroundColor: Theme.of(context).colorScheme.secondary,
flexibleSpace: SafeArea(
child: child,
),
Expand Down

0 comments on commit 22ed9ad

Please sign in to comment.