SchabanBo / qlevar_router

Manage you project Routes. Create nested routes. Simply navigation without context to your pages. Change only one sub widget in your page when navigating to new route.
MIT License
86 stars 22 forks source link

Illegal percent encoding in URI #135

Closed rounce closed 1 year ago

rounce commented 1 year ago

when QR.settings.autoRestoration and there's unicode characters in url.

Non-fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: Invalid argument(s): Illegal percent encoding in URI
       at Uri.decodeComponent(dart:core)
       at QRouterDelegate.setNewRoutePath(router_delegate.dart:99)
       at RouterDelegate.setRestoredRoutePath(router.dart:1294)
       at _RouterState._processParsedRouteInformation.<fn>(router.dart:714)

Looks like "configuration" variable is not encoded (Uri.encodeFull).

Worked around the problem with this code:

    try {
      configuration = Uri.decodeFull(configuration).toString();
    } catch (_) {
    }