fix: GoRouter captures receive sharing intents sometimes

This commit is contained in:
Christian Kußowski 2026-03-21 11:29:37 +01:00
commit dcdaededd2
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
2 changed files with 6 additions and 1 deletions

View file

@ -39,6 +39,10 @@ class FluffyChatApp extends StatelessWidget {
routes: AppRoutes.routes,
debugLogDiagnostics: true,
redirect: (context, state) {
// Workaround for content sharings passed to go router:
if (state.uri.scheme == 'content') return null;
// Pass deep links to app:
if (state.uri.toString().startsWith(AppConfig.deepLinkPrefix)) {
return '/rooms/newprivatechat?deeplink=${state.uri}';
}