I'm new to flutter and start developing my first app in flutter but facing issue in routing data from one dart file to another. The example of my code is given below.
I have define route in main.dart like this
final routes = <String, WidgetBuilder>{
Login.tag: (context) => new Login(),
HomeView.tag: (context) => new HomeView(),
};
I have two separate file for login and homeview
In Login file the tag is also defined and as the user authenticate it will navigate to HomeView.
// tag defination
static String tag = 'login';
//Navigate on successfull login
Navigator.of(context).pushNamed(HomeView.tag);
So, How can I pass the userdata in that navigator command to HomeView that was fetch using REST Api in JSON format.