AppBar bottom widget, not necessarily a TabBar (#4631)
This commit is contained in:
@@ -119,7 +119,7 @@ class ColorsDemo extends StatelessWidget {
|
||||
appBar: new AppBar(
|
||||
elevation: 0,
|
||||
title: new Text('Colors'),
|
||||
tabBar: new TabBar<ColorSwatch>(
|
||||
bottom: new TabBar<ColorSwatch>(
|
||||
isScrollable: true,
|
||||
labels: new Map<ColorSwatch, TabLabel>.fromIterable(colorSwatches, value: (ColorSwatch swatch) {
|
||||
return new TabLabel(text: swatch.name);
|
||||
|
||||
@@ -71,7 +71,7 @@ class ScrollableTabsDemoState extends State<ScrollableTabsDemo> {
|
||||
]
|
||||
)
|
||||
],
|
||||
tabBar: new TabBar<IconData>(
|
||||
bottom: new TabBar<IconData>(
|
||||
isScrollable: true,
|
||||
labels: new Map<IconData, TabLabel>.fromIterable(
|
||||
icons,
|
||||
|
||||
@@ -50,7 +50,7 @@ class TabsDemoState extends State<TabsDemo> {
|
||||
appBarBehavior: AppBarBehavior.under,
|
||||
appBar: new AppBar(
|
||||
title: new Text('Tabs and scrolling'),
|
||||
tabBar: new TabBar<_Page>(
|
||||
bottom: new TabBar<_Page>(
|
||||
labels: new Map<_Page, TabLabel>.fromIterable(_pages, value: (_Page page) {
|
||||
return new TabLabel(text: page.label);
|
||||
})
|
||||
|
||||
@@ -100,7 +100,7 @@ class _TabsFabDemoState extends State<TabsFabDemo> {
|
||||
key: scaffoldKey,
|
||||
appBar: new AppBar(
|
||||
title: new Text('FAB per tab'),
|
||||
tabBar: new TabBar<_Page>(
|
||||
bottom: new TabBar<_Page>(
|
||||
labels: new Map<_Page, TabLabel>.fromIterable(pages, value: (_Page page) => page.tabLabel)
|
||||
)
|
||||
),
|
||||
|
||||
@@ -16,15 +16,16 @@ class TwoLevelListDemo extends StatelessWidget {
|
||||
children: <Widget>[
|
||||
new TwoLevelListItem(title: new Text('Top')),
|
||||
new TwoLevelSublist(
|
||||
title: new Text('Sublist'),
|
||||
children: <Widget>[
|
||||
new TwoLevelListItem(title: new Text('One')),
|
||||
new TwoLevelListItem(title: new Text('Two')),
|
||||
new TwoLevelListItem(title: new Text('Free')),
|
||||
new TwoLevelListItem(title: new Text('Four'))
|
||||
]
|
||||
),
|
||||
new TwoLevelListItem(title: new Text('Bottom'))
|
||||
title: new Text('Sublist'),
|
||||
children: <Widget>[
|
||||
new TwoLevelListItem(title: new Text('One')),
|
||||
new TwoLevelListItem(title: new Text('Two')),
|
||||
// https://en.wikipedia.org/wiki/Free_Four
|
||||
new TwoLevelListItem(title: new Text('Free')),
|
||||
new TwoLevelListItem(title: new Text('Four'))
|
||||
]
|
||||
),
|
||||
new TwoLevelListItem(title: new Text('Bottom'))
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
@@ -73,7 +73,7 @@ class TabbedComponentDemoScaffold extends StatelessWidget {
|
||||
child: new Scaffold(
|
||||
appBar: new AppBar(
|
||||
title: new Text(title),
|
||||
tabBar: new TabBar<ComponentDemoTabData>(
|
||||
bottom: new TabBar<ComponentDemoTabData>(
|
||||
isScrollable: true,
|
||||
labels: ComponentDemoTabData.buildTabLabels(demos)
|
||||
)
|
||||
|
||||
@@ -241,7 +241,7 @@ class StockHomeState extends State<StockHome> {
|
||||
]
|
||||
)
|
||||
],
|
||||
tabBar: new TabBar<StockHomeTab>(
|
||||
bottom: new TabBar<StockHomeTab>(
|
||||
labels: <StockHomeTab, TabLabel>{
|
||||
StockHomeTab.market: new TabLabel(text: StockStrings.of(context).market()),
|
||||
StockHomeTab.portfolio: new TabLabel(text: StockStrings.of(context).portfolio())
|
||||
|
||||
Reference in New Issue
Block a user