Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: sky/examples/widgets/tabs.dart

Issue 1213873002: Use Theme to define the colors and TextStyles for Tab, TabBar (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | sky/sdk/lib/widgets/tabs.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import 'package:sky/theme/colors.dart'; 5 import 'package:sky/theme/colors.dart';
6 import 'package:sky/theme/typography.dart'; 6 import 'package:sky/theme/typography.dart';
7 import 'package:sky/widgets/basic.dart'; 7 import 'package:sky/widgets/basic.dart';
8 import 'package:sky/widgets/material.dart'; 8 import 'package:sky/widgets/material.dart';
9 import 'package:sky/widgets/scaffold.dart'; 9 import 'package:sky/widgets/scaffold.dart';
10 import 'package:sky/widgets/tabs.dart'; 10 import 'package:sky/widgets/tabs.dart';
(...skipping 26 matching lines...) Expand all
37 .map((s) => new TabLabel(icon: 'action/search_white')); 37 .map((s) => new TabLabel(icon: 'action/search_white'));
38 38
39 Iterable<TabLabel> textAndIconLabels = items 39 Iterable<TabLabel> textAndIconLabels = items
40 .map((s) => new TabLabel(text: "ITEM " + s, icon: 'action/search_white')); 40 .map((s) => new TabLabel(text: "ITEM " + s, icon: 'action/search_white'));
41 41
42 var navigatorIndex = 0; 42 var navigatorIndex = 0;
43 Iterable<Widget> tabNavigators = [textLabels, iconLabels, textAndIconLabels] 43 Iterable<Widget> tabNavigators = [textLabels, iconLabels, textAndIconLabels]
44 .map((labels) => buildTabNavigator(labels, navigatorIndex++)); 44 .map((labels) => buildTabNavigator(labels, navigatorIndex++));
45 45
46 ToolBar toolbar = new ToolBar( 46 ToolBar toolbar = new ToolBar(
47 center: new Text('Tabbed Navigator', style: white.title), 47 center: new Text('Tabbed Navigator', style: white.title)
48 backgroundColor: Blue[500]); 48 );
49 49
50 return new Scaffold( 50 return new Scaffold(
51 toolbar: toolbar, 51 toolbar: toolbar,
52 body: new Material( 52 body: new Material(
53 child: new Center(child: new Block(tabNavigators.toList())), 53 child: new Center(child: new Block(tabNavigators.toList())),
54 color: Grey[500] 54 color: Grey[500]
55 ) 55 )
56 ); 56 );
57 } 57 }
58 } 58 }
59 59
60 void main() { 60 void main() {
61 runApp(new TabbedNavigatorApp()); 61 runApp(new TabbedNavigatorApp());
62 } 62 }
OLDNEW
« no previous file with comments | « no previous file | sky/sdk/lib/widgets/tabs.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698