Open isegal opened 4 months ago
Hey @isegal thanks for your report. I can confirm that an error occurs when I replicate your steps. Now, I don't know if this is a wrong implementation, and there is another way to do it, or it's an actual bug. I will send this to our technical team so they can clarify the situation, they will keep you updated on this thread. Have a great day!
I can confirm the issue with an existing application which until the update worked correctly.
Any indication of when this "unknown" issue might be addressed?
@FlutterFlowEng we still see this issue, others have confirmed. Are there any concerns or anything preventing the team to apply the fix?
@FlutterFlowEng we have confirmed that the one-liner works in production.
The code that FF generates appears to be the wrong (old way) to get the URI and can grey-screen in some scenarios:
GoRouterState.of(context).uri.toString()
This is the correct way:
GoRouter.of(context).getCurrentLocation()
It looks like it is using FF-authored code that is intended for this purpose:
extension GoRouterLocationExtension on GoRouter {
String getCurrentLocation() {
final RouteMatch lastMatch = routerDelegate.currentConfiguration.last;
final RouteMatchList matchList = lastMatch is ImperativeRouteMatch
? lastMatch.matches
: routerDelegate.currentConfiguration;
return matchList.uri.toString();
}
}
See https://github.com/flutter/flutter/issues/135854
I am hoping that the technical information provided will allow you to apply this fix without spending much effort. It is quite awkward and inefficient for us to locally patch FF-generated code every time.
Has your issue been reported?
Current Behavior
The code that is generated for the Global Property -> "Link To Corrent Page does not work when invoked inside a component that is part of a bottom sheet.
The generated code is:
This causes the widget to crash due to the new Go Router breaking changes.
See: https://github.com/flutter/flutter/issues/131154
Manually patching the generated code to the following makes the problem go away:
Expected Behavior
It should not crash. The variable should return a link to current page.
Steps to Reproduce
Reproducible from Blank
Bug Report Code (Required)
IT40hcnfz5Fgod9c1rrUK/lahmU5JlN9RI0Nke57aCgofePtOol3evXsUFBtZMumS2xiMUSmmT4d+d6NiISTG8ABNTidc4hE+qpUEQ6UWl6ha5OBBs2WbX98HZ5hCnXD4bbQsBB4GPB2c1oFw12MGeqQdDLYN7WxImdISq/LZO4=
Context
Before the GoRouter upgrade, there was no crash. Currently it makkes our app not acceptible for production release.
Visual documentation
Additional Info
Have the dev team take a look at the snippets I posted above. It might be a quick fix.
Environment
General
Relative to the time the changes were made, data was lost within
When following my steps to reproduce, data loss happens