csells / go_router

The purpose of the go_router for Flutter is to use declarative routes to reduce complexity, regardless of the platform you're targeting (mobile, web, desktop), handling deep linking from Android, iOS and the web while still allowing an easy-to-use developer experience.
https://gorouter.dev
441 stars 96 forks source link

_AssertionError package:flutter/src/widgets/heroes.dart': Failed assertion: line 639 #309

Closed berbsd closed 2 years ago

berbsd commented 2 years ago

I am running this issue (similar to #169) and it's been puzzling me for a couple of days. The stack is copied below. I did create a sample project to show the issue. I would appreciate if someone could take a look and point me to a solution or a better approach.

════════ Exception caught by scheduler library ══════════ The following assertion was thrown during a scheduler callback: 'package:flutter/src/widgets/heroes.dart': Failed assertion: line 639 pos 12: '() { package:flutter/…/widgets/heroes.dart:1 final Animation initial = initialManifest.animation; assert(initial != null); final HeroFlightDirection type = initialManifest.type; assert(type != null); switch (type) { case HeroFlightDirection.pop: return initial.value == 1.0 && initialManifest.isUserGestureTransition // During user gesture transitions, the animation controller isn't // driving the reverse transition, but should still be in a previously // completed stage with the initial value at 1.0. ? initial.status == AnimationStatus.completed : initial.status == AnimationStatus.reverse; case HeroFlightDirection.push: return initial.value == 0.0 && initial.status == AnimationStatus.forward; } }()': is not true.

berbsd commented 2 years ago

found workaround for now

csells commented 2 years ago

Good news!

chungonion commented 2 years ago

found workaround for now

Hi there, I am facing a similar issue (although the app does not crash), just wonder what is the workaround for that? Thank you!