Skip to content

Instantly share code, notes, and snippets.

@tomgilder
Created September 5, 2022 08:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomgilder/40a22dfc644e91f4eecf39e4dc5c8312 to your computer and use it in GitHub Desktop.
Save tomgilder/40a22dfc644e91f4eecf39e4dc5c8312 to your computer and use it in GitHub Desktop.
solid-gust-7810
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