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

Side by Side Diff: sky/sdk/example/widgets/tabs.dart

Issue 1217293003: Remove Material's opinion about background colours, since in fact the background colour varies dram… (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 | « sky/sdk/example/widgets/styled_text.dart ('k') | sky/sdk/lib/widgets/flat_button.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/painting/text_style.dart'; 5 import 'package:sky/painting/text_style.dart';
6 import 'package:sky/theme/typography.dart'; 6 import 'package:sky/theme/colors.dart' as colors;
7 import 'package:sky/theme/typography.dart' as typography;
7 import 'package:sky/widgets/basic.dart'; 8 import 'package:sky/widgets/basic.dart';
8 import 'package:sky/widgets/material.dart'; 9 import 'package:sky/widgets/material.dart';
9 import 'package:sky/widgets/scaffold.dart'; 10 import 'package:sky/widgets/scaffold.dart';
10 import 'package:sky/widgets/tabs.dart'; 11 import 'package:sky/widgets/tabs.dart';
11 import 'package:sky/widgets/tool_bar.dart'; 12 import 'package:sky/widgets/tool_bar.dart';
12 import 'package:sky/widgets/widget.dart'; 13 import 'package:sky/widgets/widget.dart';
13 14
14 class TabbedNavigatorApp extends App { 15 class TabbedNavigatorApp extends App {
15 int selectedIndex = 0; 16 int selectedIndex = 0;
16 17
(...skipping 21 matching lines...) Expand all
38 39
39 TabNavigator tabNavigator = new TabNavigator( 40 TabNavigator tabNavigator = new TabNavigator(
40 views: views, 41 views: views,
41 selectedIndex: selectedIndex, 42 selectedIndex: selectedIndex,
42 onChanged: (tabIndex) { 43 onChanged: (tabIndex) {
43 setState(() { selectedIndex = tabIndex; } ); 44 setState(() { selectedIndex = tabIndex; } );
44 } 45 }
45 ); 46 );
46 47
47 ToolBar toolbar = new ToolBar( 48 ToolBar toolbar = new ToolBar(
48 center: new Text('Tabbed Navigator', style: white.title) 49 center: new Text('Tabbed Navigator', style: typography.white.title)
49 ); 50 );
50 51
51 return new Scaffold( 52 return new Scaffold(
52 toolbar: toolbar, 53 toolbar: toolbar,
53 body: new Material(child: tabNavigator) 54 body: new Material(
55 color: colors.Grey[50],
56 child: tabNavigator
57 )
54 ); 58 );
55 } 59 }
56 } 60 }
57 61
58 void main() { 62 void main() {
59 runApp(new TabbedNavigatorApp()); 63 runApp(new TabbedNavigatorApp());
60 } 64 }
OLDNEW
« no previous file with comments | « sky/sdk/example/widgets/styled_text.dart ('k') | sky/sdk/lib/widgets/flat_button.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698