push function
To push another screen on the stack use push and pass the context
,Screen/Page/Widget
To push a named or onGenerate route please use pushNamed and pass the context
,Route,arguments
if any
Implementation
Future<Widget?> push(BuildContext context, Widget route) => Navigator.push(
context,
MaterialPageRoute<Widget>(
builder: (_) => route,
),
);