I am a recent flutter developer. How can i get current route name?I am having a common list view in two different routes. I want to hide certain properties in list based on routes.
Please help me..
I am a recent flutter developer. How can i get current route name?I am having a common list view in two different routes. I want to hide certain properties in list based on routes.
Please help me..
try this:
var route = ModalRoute.of(context);
if(route!=null){
print(route.settings.name);
}