Created with <3 with dartpad.dev.
Created
September 5, 2022 08:28
-
-
Save tomgilder/40a22dfc644e91f4eecf39e4dc5c8312 to your computer and use it in GitHub Desktop.
solid-gust-7810
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
home: DefaultTabController( | |
length: 3, | |
animationDuration: Duration.zero, | |
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)), | |
], | |
), | |
), | |
body: const TabBarView( | |
children: [ | |
Text('Page one'), | |
Text('Page two'), | |
Text('Page three'), | |
], | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment