getx
getx copied to clipboard
Could not find a generator for route RouteSettings("/social/users/1/post", 1) in the _WidgetsAppState in flutter
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 you need to defined also /social/users/:id/post route