| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |