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

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

Issue 1218153005: Refactoring to support dark theme better (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix import issues 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/home.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' as typography; 6 import 'package:sky/theme/typography.dart' as typography;
7 import 'package:sky/widgets/basic.dart'; 7 import 'package:sky/widgets/basic.dart';
8 import 'package:sky/widgets/card.dart'; 8 import 'package:sky/widgets/card.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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 builder: () => _buildContent("Summary") 69 builder: () => _buildContent("Summary")
70 ) 70 )
71 ]; 71 ];
72 return _buildTabNavigator(n, views); 72 return _buildTabNavigator(n, views);
73 } 73 }
74 74
75 Container _buildCard(TabNavigator tabNavigator) { 75 Container _buildCard(TabNavigator tabNavigator) {
76 return new Container( 76 return new Container(
77 child: new Card(child: tabNavigator), 77 child: new Card(child: tabNavigator),
78 padding: const EdgeDims.all(12.0), 78 padding: const EdgeDims.all(12.0),
79 decoration: new BoxDecoration(backgroundColor: Theme.of(this).primary[50]) 79 decoration: new BoxDecoration(backgroundColor: Theme.of(this).primarySwatch [50])
80 ); 80 );
81 } 81 }
82 82
83 Widget build() { 83 Widget build() {
84 List<TabNavigatorView> views = <TabNavigatorView>[ 84 List<TabNavigatorView> views = <TabNavigatorView>[
85 new TabNavigatorView( 85 new TabNavigatorView(
86 label: const TabLabel(text: 'TEXT'), 86 label: const TabLabel(text: 'TEXT'),
87 builder: () => _buildCard(_buildTextLabelsTabNavigator(0)) 87 builder: () => _buildCard(_buildTextLabelsTabNavigator(0))
88 ), 88 ),
89 new TabNavigatorView( 89 new TabNavigatorView(
(...skipping 15 matching lines...) Expand all
105 return new Scaffold( 105 return new Scaffold(
106 toolbar: toolbar, 106 toolbar: toolbar,
107 body: tabNavigator 107 body: tabNavigator
108 ); 108 );
109 } 109 }
110 } 110 }
111 111
112 void main() { 112 void main() {
113 runApp(new TabbedNavigatorApp()); 113 runApp(new TabbedNavigatorApp());
114 } 114 }
OLDNEW
« no previous file with comments | « sky/sdk/example/widgets/styled_text.dart ('k') | sky/sdk/home.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698