provider pass a class to materialPageRoute code example
Example 1: pass string to a provider flutter
_secondPage(BuildContext context, Widget page) async { final dataFromSecondPage = await Navigator.push( context, MaterialPageRoute(builder: (context) => page), ) as Data;
Example 2: pass data from one provider model to anothe
GetIt locator = GetIt();locator.registerLazySingleton(() => Api());locator.registerLazySingleton(() => AuthenticationService());locator.registerLazySingleton(() => LoginModel());