I’m new to Flutter and I’m trying to do something that looks like this for my app :
So that I can switch between them and they will display two different pages. What’s this template called ? Can you link me to some websites that could help code it.
Thank you!
CodePudding user response:
It's called tabs or tab bar. Check out the documentation https://docs.flutter.dev/cookbook/design/tabs
return MaterialApp(
home: DefaultTabController(
length: 3,
child: Scaffold(
appBar: AppBar(
bottom: const TabBar(
tabs: [
Tab(icon: Icon(Icons.directions_car)),
Tab(icon: Icon(Icons.directions_transit)),
Tab(icon: Icon(Icons.directions_bike)),
],
),
),
),
),
);