mirror of
https://github.com/material-components/material-components-flutter.git
synced 2026-01-20 20:22:36 +08:00
* Release * [ExpandingBottomSheet] Adding eng guidance doc. * [ExpandingBottomSheet] links. * [ExpandingBottomSheet] Moving file. * [ExpandingBottomSheet] PR feedback. * Merge Develop into Master (#37) * [ExpandingBottomSheet] Eng guidance doc. (#22) * [ExpandingBottomSheet] Adding eng guidance doc. * [ExpandingBottomSheet] links. * [ExpandingBottomSheet] Moving file. * [ExpandingBottomSheet] PR feedback. * Added Dartpad demos and buttons, cards, and text field demos (#30) * added dartpad demos and buttons, cards, and text field demos * updated dartpad examples * Fixed metatdata (#31) * Added Top App Bar Dartpad examples (#32) * Added Top App Bar Dartpad examples * Added new line at end of files * Updated dartpad * Update documents and add Dart syntax highlighting (#33) * Updated Documents with Dartpad Links * Added Dart specific highlighting * Update dartpad to material spec` * Added Top App Bar Markdown (#34) * Added Top App Bar Markdown * Fixed commnents * fixed issues * Update Flutter links in README.md (#28) * Update Flutter links in README.md * Update README.md Co-Authored-By: Cristian Zazo <cristian.zazo@gmail.com> Co-authored-by: rami-a <2364772+rami-a@users.noreply.github.com> * Add dev docs for FABs including dartpad demos (#35) * ran git rebase -i HEAD~10 * Pulled difference Co-authored-by: Will Larche <larche@google.com> Co-authored-by: Cristian Zazo <cristian.zazo@gmail.com> Co-authored-by: rami-a <2364772+rami-a@users.noreply.github.com> * Update Dartpad links (#41) * [Dev docs] Bottom Navigation dev docs (#40) * flutter bottom navigation docs * [Dev docs] Add bottom app bar docs (#42) * Add bottom app bar docs * Update screenshots * Update bottom_app_bars.md * empty * Add fab links * [Dev docs] Add list docs (#43) * Lists template * Singe-line list example * Update example code * Add two line list example * Use label icon in examples * Add three line example * Update images * Add selected arg to three list example * Add selected arg to two list example * Add themeing example * CR feedback * Added Tabs and Data Tables: Images, Dartpad, and Markdown File (#44) * Added Tabs and Data Tables: Images, Dartpad, and Markdown File * Fixed issues and updated images * Fixed typos and markdown * Updated Documents (#45) * Updated Documents * fixed issues * Switched to sentence case * Update fab assets and demo code to use correct colors (#47) * Add initial snackbar docs (#48) * Add initial snackbar docs * Address feedback * Radio button Dev Docs (#49) * Fix path to radio button assets (#51) * Dev docs for banners (#52) * Add dev docs for checkboxes (#50) * Add dev docs for checkboxes * Update contents links * Make the text grey if checkbox is disabled * Remove content link (#54) * Remove content link * fixed ide issue * Update fab.md (#55) * Fix fab table * Update fab.md * Update README.md (#56) * Update README.md * Update README.md * Update README.md * Create dialogs dev docs (#57) * Chips and Progress Indicators markdown, images, and dartpads (#58) * chips and pi * images * Added dartpads for progress indicators and chips * Added images * Fixed other docs * Made other files better * Progress indicator markdown * Progress Indicator markdown * chips markdown * theme_chips_image * fixed issues * addressed issues * typo * Fix typos and heading links in Tabs (#59) * updating head branch with master Co-authored-by: Will Larche <larche@google.com> Co-authored-by: Cristian Zazo <cristian.zazo@gmail.com> Co-authored-by: rami-a <2364772+rami-a@users.noreply.github.com> Co-authored-by: MH Johnson <johnsonmh@users.noreply.github.com> Co-authored-by: Pierre-Louis <6655696+guidezpl@users.noreply.github.com> Co-authored-by: Per Classon <perc@google.com> Co-authored-by: Martin Chrástek <chrastek12@gmail.com>
50 lines
1.1 KiB
Dart
50 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
void main() => runApp(MyApp());
|
|
|
|
class MyApp extends StatelessWidget {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final tabs = [
|
|
'Tab 1',
|
|
'Tab 2',
|
|
'Tab 3',
|
|
'Tab 4',
|
|
'Tab 5',
|
|
'Tab 6',
|
|
'Tab 7',
|
|
'Tab 8',
|
|
'Tab 9',
|
|
];
|
|
|
|
return MaterialApp(
|
|
title: 'Flutter Demo',
|
|
home: DefaultTabController(
|
|
length: tabs.length,
|
|
child: Scaffold(
|
|
appBar: AppBar(
|
|
title: Text('Scrollable Tabs'),
|
|
automaticallyImplyLeading: false,
|
|
backgroundColor: Color(0xff5808e5),
|
|
bottom: TabBar(
|
|
indicatorColor: Colors.white,
|
|
isScrollable: true,
|
|
tabs: [
|
|
for (final tab in tabs) Tab(text: tab),
|
|
],
|
|
),
|
|
),
|
|
body: TabBarView(
|
|
children: [
|
|
for (final tab in tabs)
|
|
Center(
|
|
child: Text(tab),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|