In a normal Drawer we would implement navigation along the lines of:
ListTile( leading: Icon(Icons.new_releases), title: Text('News'), onTap: () => Navigator.pushReplacementNamed(context, Routes.news), ),
Then in the NewsPage I would define a Scaffold with drawer: CustomDrawer.
But this obviously won't work. Could you please provide an example on how to properly do this?
In a normal Drawer we would implement navigation along the lines of:
ListTile( leading: Icon(Icons.new_releases), title: Text('News'), onTap: () => Navigator.pushReplacementNamed(context, Routes.news), ),
Then in the NewsPage I would define a Scaffold with drawer: CustomDrawer. But this obviously won't work. Could you please provide an example on how to properly do this?