getx icon indicating copy to clipboard operation
getx copied to clipboard

Could not find a generator for route RouteSettings("/social/users/1/post", 1) in the _WidgetsAppState in flutter

Open Sunsiha opened this issue 3 years ago • 1 comments
trafficstars

I wanted to show routing url in flutter web. So for that am using Getx the following way,

 class AppRoutes {
      static const users = '/social/users/';
}

main.dart

 routes: <String, WidgetBuilder>{
            AppRoutes.users: (BuildContext context) =>
            const ViewCandidatesScreen(),
          }

Redirecting to another screen;

String id='1';
Get.toNamed(AppRoutes.users+id+"/post",arguments:'1');

If I do like this it's throwing an error like the following;

Could not find a generator for route RouteSettings("/social/users/1/post", 1) in the _WidgetsAppState in flutter

Sunsiha avatar Oct 12 '22 14:10 Sunsiha

@Sunsiha you need to defined also /social/users/:id/post route

chiptus avatar Feb 17 '24 17:02 chiptus