Skip to content

Commit

Permalink
Fix removing waypoints while loading route (#356)
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulPickhardt authored Nov 25, 2023
1 parent c3ebcc7 commit 8352022
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions lib/routing/views/sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,9 @@ class RouteDetailsBottomSheetState extends State<RouteDetailsBottomSheet> {
duration: const Duration(milliseconds: 1000),
firstChild: Container(),
secondChild: renderTopInfoSection(context),
crossFadeState:
routing.selectedRoute == null ? CrossFadeState.showFirst : CrossFadeState.showSecond,
crossFadeState: routing.selectedRoute == null || routing.isFetchingRoute
? CrossFadeState.showFirst
: CrossFadeState.showSecond,
),
AnimatedCrossFade(
firstCurve: Curves.easeInOutCubic,
Expand All @@ -300,10 +301,19 @@ class RouteDetailsBottomSheetState extends State<RouteDetailsBottomSheet> {
duration: const Duration(milliseconds: 1000),
firstChild: Container(),
secondChild: renderStartRideButton(context),
crossFadeState:
routing.selectedRoute == null ? CrossFadeState.showFirst : CrossFadeState.showSecond,
crossFadeState: routing.selectedRoute == null || routing.isFetchingRoute
? CrossFadeState.showFirst
: CrossFadeState.showSecond,
),
AnimatedCrossFade(
firstCurve: Curves.easeInOutCubic,
secondCurve: Curves.easeInOutCubic,
sizeCurve: Curves.easeInOutCubic,
duration: const Duration(milliseconds: 1000),
firstChild: Container(),
secondChild: renderBottomSheetWaypoints(context),
crossFadeState: routing.isFetchingRoute ? CrossFadeState.showFirst : CrossFadeState.showSecond,
),
renderBottomSheetWaypoints(context),
if (routing.selectedWaypoints == null || routing.selectedWaypoints!.isEmpty)
const TutorialView(
id: "priobike.tutorial.draw-waypoints",
Expand Down

0 comments on commit 8352022

Please sign in to comment.