navigation bar in flutter code example
Example 1: navigation flutter
Navigator.push(
context,
MaterialPageRoute(builder: (context) => SecondRoute()),
);
Example 2: flutter named navigation
Navigator.pushNamed(context, '/second');
Navigator.push(
context,
MaterialPageRoute(builder: (context) => SecondRoute()),
);
Navigator.pushNamed(context, '/second');