Move theme into material.dart

Also, introduce Colors and Typography to hold the material colors and the
typography declarations. Previously we expected clients of these libraries to
import them into a namespace, but that doesn't play nice with re-exporting them
from material.dart.
This commit is contained in:
Adam Barth
2015-09-18 09:49:20 -07:00
parent 499d832259
commit 4467a268ce
55 changed files with 605 additions and 598 deletions

View File

@@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:sky/theme/colors.dart' as colors;
import 'package:sky/theme/typography.dart' as typography;
import 'package:sky/material.dart';
import 'package:sky/widgets.dart';
class Field extends Component {
@@ -66,7 +65,7 @@ class AddressBookApp extends App {
new AspectRatio(
aspectRatio: 16.0 / 9.0,
child: new Container(
decoration: new BoxDecoration(backgroundColor: colors.Purple[300])
decoration: new BoxDecoration(backgroundColor: Colors.purple[300])
)
),
new Field(inputKey: nameKey, icon: "social/person", placeholder: "Name"),
@@ -102,13 +101,13 @@ class AddressBookApp extends App {
Widget build() {
ThemeData theme = new ThemeData(
brightness: ThemeBrightness.light,
primarySwatch: colors.Teal,
accentColor: colors.PinkAccent[100]
primarySwatch: Colors.teal,
accentColor: Colors.pinkAccent[100]
);
return new Theme(
data: theme,
child: new DefaultTextStyle(
style: typography.error, // if you see this, you've forgotten to correctly configure the text style!
style: Typography.error, // if you see this, you've forgotten to correctly configure the text style!
child: new Title(
title: 'Address Book',
child: new Navigator(_navigationState)

View File

@@ -2,10 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:sky/services.dart';
import 'package:sky/material.dart';
import 'package:sky/painting.dart';
import 'package:sky/theme/colors.dart' as colors;
import 'package:sky/theme/typography.dart' as typography;
import 'package:sky/services.dart';
import 'package:sky/widgets.dart';
AssetBundle _initBundle() {
@@ -58,7 +57,7 @@ class SkyDemo {
final String href;
final String bundle;
final String description;
final typography.TextTheme textTheme;
final TextTheme textTheme;
final BoxDecoration decoration;
}
@@ -68,7 +67,7 @@ List<SkyDemo> demos = [
href: '../../stocks/lib/main.dart',
bundle: 'stocks.skyx',
description: 'Multi-screen app with scrolling list',
textTheme: typography.black,
textTheme: Typography.black,
decoration: new BoxDecoration(
backgroundImage: new BackgroundImage(
image: _bundle.loadImage('assets/stocks_thumbnail.png'),
@@ -81,7 +80,7 @@ List<SkyDemo> demos = [
href: '../../game/lib/main.dart',
bundle: 'game.skyx',
description: '2D game using sprite sheets',
textTheme: typography.white,
textTheme: Typography.white,
decoration: new BoxDecoration(
backgroundImage: new BackgroundImage(
image: _bundle.loadImage('assets/game_thumbnail.png'),
@@ -94,9 +93,9 @@ List<SkyDemo> demos = [
href: '../../fitness/lib/main.dart',
bundle: 'fitness.skyx',
description: 'Track progress towards healthy goals',
textTheme: typography.white,
textTheme: Typography.white,
decoration: new BoxDecoration(
backgroundColor: colors.Indigo[500]
backgroundColor: Colors.indigo[500]
)
),
new SkyDemo(
@@ -104,9 +103,9 @@ List<SkyDemo> demos = [
href: '../../widgets/card_collection.dart',
bundle: 'cards.skyx',
description: 'Infinite list of swipeable cards',
textTheme: typography.white,
textTheme: Typography.white,
decoration: new BoxDecoration(
backgroundColor: colors.RedAccent[200]
backgroundColor: Colors.redAccent[200]
)
),
new SkyDemo(
@@ -114,7 +113,7 @@ List<SkyDemo> demos = [
href: '../../rendering/interactive_flex.dart',
bundle: 'interactive_flex.skyx',
description: 'Swipe to reflow the app',
textTheme: typography.white,
textTheme: Typography.white,
decoration: new BoxDecoration(
backgroundColor: const Color(0xFF0081C6)
)
@@ -127,9 +126,9 @@ List<SkyDemo> demos = [
href: '../../mine_digger/lib/main.dart',
bundle: 'mine_digger.skyx',
description: 'Clone of the classic Minesweeper game',
textTheme: typography.white,
textTheme: Typography.white,
decoration: new BoxDecoration(
backgroundColor: colors.black
backgroundColor: Colors.black
)
),
@@ -188,7 +187,7 @@ class SkyHome extends App {
return new Theme(
data: new ThemeData(
brightness: ThemeBrightness.light,
primarySwatch: colors.Teal
primarySwatch: Colors.teal
),
child: new Title(
title: 'Sky Demos',

View File

@@ -6,9 +6,10 @@ library fitness;
import 'package:playfair/playfair.dart' as playfair;
import 'package:sky/animation.dart';
import 'package:sky/material.dart';
import 'package:sky/painting.dart';
import 'package:sky/theme/colors.dart' as colors;
import 'package:sky/widgets.dart';
import 'user_data.dart';
import 'date_utils.dart';
import 'dart:async';
@@ -171,8 +172,8 @@ class FitnessApp extends App {
return new Theme(
data: new ThemeData(
brightness: ThemeBrightness.light,
primarySwatch: colors.Indigo,
accentColor: colors.PinkAccent[200]
primarySwatch: Colors.indigo,
accentColor: Colors.pinkAccent[200]
),
child: new Title(
title: 'Fitness',

View File

@@ -2,7 +2,7 @@ name: fitness
dependencies:
sky: any
sky_tools: any
playfair: ^0.0.7
playfair: ^0.0.8
path: ^1.3.6
dependency_overrides:
material_design_icons:

View File

@@ -4,8 +4,9 @@
import 'dart:async';
import 'package:sky/services.dart';
import 'package:sky/material.dart';
import 'package:sky/painting.dart';
import 'package:sky/services.dart';
import 'package:sky/src/rendering/object.dart';
import 'package:sky/src/widgets/basic.dart';
import 'package:sky/src/widgets/button_base.dart';
@@ -13,7 +14,6 @@ import 'package:sky/src/widgets/framework.dart';
import 'package:sky/src/widgets/navigator.dart';
import 'package:sky/src/widgets/theme.dart';
import 'package:sky/src/widgets/title.dart';
import 'package:sky/theme/colors.dart' as colors;
import 'package:skysprites/skysprites.dart';
import 'game_demo.dart';
@@ -99,7 +99,7 @@ class GameDemoApp extends App {
// a custom theme swatch to match the purples in the sprites.
ThemeData theme = new ThemeData(
brightness: ThemeBrightness.light,
primarySwatch: colors.Purple
primarySwatch: Colors.purple
);
return new Theme(

View File

@@ -1,8 +1,8 @@
import 'dart:sky';
import 'package:sky/services.dart';
import 'package:sky/material.dart';
import 'package:sky/rendering.dart';
import 'package:sky/theme/colors.dart' as colors;
import 'package:sky/services.dart';
import 'package:sky/widgets.dart';
import 'package:skysprites/skysprites.dart';
@@ -37,7 +37,7 @@ class TestDrawAtlasApp extends App {
Widget build() {
ThemeData theme = new ThemeData(
brightness: ThemeBrightness.light,
primarySwatch: colors.Purple
primarySwatch: Colors.purple
);
return new Theme(

View File

@@ -1,9 +1,9 @@
import 'dart:sky' as sky;
import 'dart:math' as math;
import 'package:sky/services.dart';
import 'package:sky/material.dart';
import 'package:sky/rendering.dart';
import 'package:sky/theme/colors.dart' as colors;
import 'package:sky/services.dart';
import 'package:sky/widgets.dart';
import 'package:skysprites/skysprites.dart';
@@ -38,7 +38,7 @@ class TestApp extends App {
Widget build() {
ThemeData theme = new ThemeData(
brightness: ThemeBrightness.light,
primarySwatch: colors.Purple
primarySwatch: Colors.purple
);
return new Theme(

View File

@@ -1,8 +1,6 @@
import 'dart:sky' as sky;
import 'package:sky/services.dart';
import 'package:sky/material.dart';
import 'package:sky/rendering.dart';
import 'package:sky/theme/colors.dart' as colors;
import 'package:sky/services.dart';
import 'package:sky/widgets.dart';
import 'package:skysprites/skysprites.dart';
@@ -50,7 +48,7 @@ class TestApp extends App {
Widget build() {
ThemeData theme = new ThemeData(
brightness: ThemeBrightness.light,
primarySwatch: colors.Purple
primarySwatch: Colors.purple
);
return new Theme(

View File

@@ -4,10 +4,10 @@
import 'dart:sky' as sky;
import 'dart:math';
import 'package:sky/services.dart';
import 'package:sky/material.dart';
import 'package:sky/painting.dart';
import 'package:sky/rendering.dart';
import 'package:sky/theme/colors.dart' as colors;
import 'package:sky/services.dart';
import 'package:sky/widgets.dart';
// Classic minesweeper-inspired game. The mouse controls are standard
@@ -184,7 +184,7 @@ class MineDiggerApp extends App {
toolbar: buildToolBar(),
body: new Container(
child: new Center(child: board),
decoration: new BoxDecoration(backgroundColor: colors.Grey[50])
decoration: new BoxDecoration(backgroundColor: Colors.grey[50])
)
)
);

View File

@@ -4,14 +4,15 @@
import 'dart:math' as math;
import 'package:sky/material.dart';
import 'package:sky/rendering.dart';
import 'package:sky/theme/colors.dart' as colors;
import 'solid_color_box.dart';
Color randomColor() {
final List<Color> allColors = [
colors.Blue,
colors.Indigo
Colors.blue,
Colors.indigo
].map((p) => p.values).fold([], (a, b) => a..addAll(b));
final random = new math.Random();
return allColors[random.nextInt(allColors.length)];

View File

@@ -5,15 +5,14 @@
import 'dart:sky';
import 'package:sky/rendering.dart';
import 'package:sky/theme/colors.dart' as colors;
import 'package:sky/theme/shadows.dart';
import 'package:sky/material.dart';
void main() {
var coloredBox = new RenderDecoratedBox(
decoration: new BoxDecoration(
gradient: new RadialGradient(
center: Point.origin, radius: 500.0,
colors: [colors.Yellow[500], colors.Blue[500]]),
colors: [Colors.yellow[500], Colors.blue[500]]),
boxShadow: shadows[3])
);
var paddedBox = new RenderPadding(

View File

@@ -4,17 +4,17 @@
import 'dart:sky' as sky;
import 'package:sky/material.dart';
import 'package:sky/rendering.dart';
import 'package:sky/theme/colors.dart' as colors;
// Material design colors. :p
List<Color> kColors = [
colors.Teal[500],
colors.Amber[500],
colors.Purple[500],
colors.LightBlue[500],
colors.DeepPurple[500],
colors.Lime[500],
Colors.teal[500],
Colors.amber[500],
Colors.purple[500],
Colors.lightBlue[500],
Colors.deepPurple[500],
Colors.lime[500],
];
class Dot {

View File

@@ -7,9 +7,8 @@ library stocks;
import 'dart:math' as math;
import 'dart:sky' as sky;
import 'package:sky/theme/colors.dart' as colors;
import 'package:sky/theme/typography.dart' as typography;
import 'package:sky/animation.dart';
import 'package:sky/material.dart';
import 'package:sky/widgets.dart';
import 'stock_data.dart';
@@ -82,19 +81,19 @@ class StocksApp extends App {
if (optimismSetting == StockMode.optimistic) {
theme = new ThemeData(
brightness: ThemeBrightness.light,
primarySwatch: colors.Purple
primarySwatch: Colors.purple
);
} else {
theme = new ThemeData(
brightness: ThemeBrightness.dark,
accentColor: colors.RedAccent[200]
accentColor: Colors.redAccent[200]
);
}
return new Theme(
data: theme,
child: new DefaultTextStyle(
style: typography.error, // if you see this, you've forgotten to correctly configure the text style!
style: Typography.error, // if you see this, you've forgotten to correctly configure the text style!
child: new Title(
title: 'Stocks',
child: new Navigator(_navigationState)

View File

@@ -18,8 +18,8 @@ class StockArrow extends Component {
Color _colorForPercentChange(double percentChange) {
if (percentChange > 0)
return colors.Green[_colorIndexForPercentChange(percentChange)];
return colors.Red[_colorIndexForPercentChange(percentChange)];
return Colors.green[_colorIndexForPercentChange(percentChange)];
return Colors.red[_colorIndexForPercentChange(percentChange)];
}
Widget build() {

View File

@@ -275,7 +275,7 @@ class StockHome extends StatefulComponent {
return _snackBarAnchor.build(
new FloatingActionButton(
child: new Icon(type: 'content/add', size: 24),
backgroundColor: colors.RedAccent[200],
backgroundColor: Colors.redAccent[200],
onPressed: _handleStockPurchased
));
}

View File

@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:sky/material.dart';
import 'package:sky/widgets.dart';
import 'package:sky/theme/colors.dart' as colors;
class BigSwitchApp extends App {
bool _value = false;
@@ -22,7 +22,7 @@ class BigSwitchApp extends App {
padding: new EdgeDims.all(20.0),
transform: scale,
decoration: new BoxDecoration(
backgroundColor: colors.Teal[600]
backgroundColor: Colors.teal[600]
)
);
}

View File

@@ -2,9 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:sky/theme/colors.dart' as colors;
import 'package:sky/theme/typography.dart' as typography;
import 'package:sky/animation.dart';
import 'package:sky/material.dart';
import 'package:sky/widgets.dart';
class CardModel {
@@ -19,10 +18,10 @@ class CardModel {
class CardCollectionApp extends App {
static const TextStyle cardLabelStyle =
const TextStyle(color: colors.white, fontSize: 18.0, fontWeight: bold);
const TextStyle(color: Colors.white, fontSize: 18.0, fontWeight: bold);
final TextStyle backgroundTextStyle =
typography.white.title.copyWith(textAlign: TextAlign.center);
Typography.white.title.copyWith(textAlign: TextAlign.center);
MixedViewportLayoutState _layoutState = new MixedViewportLayoutState();
List<CardModel> _cardModels;
@@ -38,7 +37,7 @@ class CardCollectionApp extends App {
48.0, 63.0, 82.0, 146.0, 60.0, 55.0, 84.0, 96.0, 50.0
];
_cardModels = new List.generate(cardHeights.length, (i) {
Color color = Color.lerp(colors.Red[300], colors.Blue[900], i / cardHeights.length);
Color color = Color.lerp(Colors.red[300], Colors.blue[900], i / cardHeights.length);
return new CardModel(i, cardHeights[i], color);
});
super.initState();
@@ -211,8 +210,8 @@ class CardCollectionApp extends App {
return new Theme(
data: new ThemeData(
brightness: ThemeBrightness.light,
primarySwatch: colors.Blue,
accentColor: colors.RedAccent[200]
primarySwatch: Colors.blue,
accentColor: Colors.redAccent[200]
),
child: new Title(
title: 'Cards',

View File

@@ -3,7 +3,7 @@
// found in the LICENSE file.
import 'package:sky/widgets.dart';
import 'package:sky/theme/colors.dart' as colors;
import 'package:sky/material.dart';
void main() => runApp(new DatePickerDemo());
@@ -26,7 +26,7 @@ class DatePickerDemo extends App {
return new Theme(
data: new ThemeData(
brightness: ThemeBrightness.light,
primarySwatch: colors.Teal
primarySwatch: Colors.teal
),
child: new Stack([
new Scaffold(

View File

@@ -4,7 +4,7 @@
import 'dart:sky' as sky;
import 'package:sky/theme/colors.dart' as colors;
import 'package:sky/material.dart';
import 'package:sky/widgets.dart';
final double kTop = 10.0 + sky.view.paddingTop;
@@ -39,9 +39,9 @@ class ExampleDragTarget extends StatefulComponent {
decoration: new BoxDecoration(
border: new Border.all(
width: 3.0,
color: data.isEmpty ? colors.white : colors.Blue[500]
color: data.isEmpty ? Colors.white : Colors.blue[500]
),
backgroundColor: data.isEmpty ? colors.Grey[500] : colors.Green[500]
backgroundColor: data.isEmpty ? Colors.grey[500] : Colors.green[500]
),
child: new Center(
child: new Text(_text)
@@ -58,7 +58,7 @@ class Dot extends Component {
width: 50.0,
height: 50.0,
decoration: new BoxDecoration(
backgroundColor: colors.DeepOrange[500]
backgroundColor: Colors.deepOrange[500]
)
);
}
@@ -140,7 +140,7 @@ class DragAndDropApp extends App {
}
return new Container(
decoration: new BoxDecoration(backgroundColor: colors.Pink[500]),
decoration: new BoxDecoration(backgroundColor: Colors.pink[500]),
child: new Stack(layers)
);
}

View File

@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:sky/theme/colors.dart' as colors;
import 'package:sky/material.dart';
import 'package:sky/widgets.dart';
class CardModel {
@@ -17,10 +17,10 @@ class CardModel {
class EnsureVisibleApp extends App {
static const TextStyle cardLabelStyle =
const TextStyle(color: colors.white, fontSize: 18.0, fontWeight: bold);
const TextStyle(color: Colors.white, fontSize: 18.0, fontWeight: bold);
static const TextStyle selectedCardLabelStyle =
const TextStyle(color: colors.white, fontSize: 24.0, fontWeight: bold);
const TextStyle(color: Colors.white, fontSize: 24.0, fontWeight: bold);
List<CardModel> cardModels;
MixedViewportLayoutState layoutState = new MixedViewportLayoutState();
@@ -33,7 +33,7 @@ class EnsureVisibleApp extends App {
48.0, 63.0, 82.0, 146.0, 60.0, 55.0, 84.0, 96.0, 50.0
];
cardModels = new List.generate(cardHeights.length, (i) {
Color color = Color.lerp(colors.Red[300], colors.Blue[900], i / cardHeights.length);
Color color = Color.lerp(Colors.red[300], Colors.blue[900], i / cardHeights.length);
return new CardModel(i, cardHeights[i], color);
});
@@ -83,8 +83,8 @@ class EnsureVisibleApp extends App {
child: new Theme(
data: new ThemeData(
brightness: ThemeBrightness.light,
primarySwatch: colors.Blue,
accentColor: colors.RedAccent[200]
primarySwatch: Colors.blue,
accentColor: Colors.redAccent[200]
),
child: new Title(
title: 'Cards',

View File

@@ -4,8 +4,8 @@
import 'dart:sky' as sky;
import 'package:sky/material.dart';
import 'package:sky/rendering.dart';
import 'package:sky/theme/colors.dart' as colors;
import 'package:sky/widgets.dart';
class CardModel {
@@ -67,7 +67,7 @@ class Marker extends Component {
class OverlayGeometryApp extends App {
static const TextStyle cardLabelStyle =
const TextStyle(color: colors.white, fontSize: 18.0, fontWeight: bold);
const TextStyle(color: Colors.white, fontSize: 18.0, fontWeight: bold);
List<CardModel> cardModels;
MixedViewportLayoutState layoutState = new MixedViewportLayoutState();
@@ -82,7 +82,7 @@ class OverlayGeometryApp extends App {
48.0, 63.0, 82.0, 146.0, 60.0, 55.0, 84.0, 96.0, 50.0
];
cardModels = new List.generate(cardHeights.length, (i) {
Color color = Color.lerp(colors.Red[300], colors.Blue[900], i / cardHeights.length);
Color color = Color.lerp(Colors.red[300], Colors.blue[900], i / cardHeights.length);
return new CardModel(i, cardHeights[i], color);
});
super.initState();
@@ -163,8 +163,8 @@ class OverlayGeometryApp extends App {
child: new Theme(
data: new ThemeData(
brightness: ThemeBrightness.light,
primarySwatch: colors.Blue,
accentColor: colors.RedAccent[200]
primarySwatch: Colors.blue,
accentColor: Colors.redAccent[200]
),
child: new Title(title: 'Cards', child: new Stack(layers))
)

View File

@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:sky/theme/colors.dart';
import 'package:sky/animation.dart';
import 'package:sky/material.dart';
import 'package:sky/widgets.dart';
class CardModel {
@@ -18,7 +18,7 @@ class CardModel {
class PageableListApp extends App {
static const TextStyle cardLabelStyle =
const TextStyle(color: white, fontSize: 18.0, fontWeight: bold);
const TextStyle(color: Colors.white, fontSize: 18.0, fontWeight: bold);
List<CardModel> cardModels;
Size pageSize = new Size(200.0, 200.0);
@@ -33,7 +33,7 @@ class PageableListApp extends App {
.toList();
cardModels = new List.generate(cardSizes.length, (i) {
Color color = Color.lerp(Red[300], Blue[900], i / cardSizes.length);
Color color = Color.lerp(Colors.red[300], Colors.blue[900], i / cardSizes.length);
return new CardModel(i, cardSizes[i], color);
});
@@ -167,8 +167,8 @@ class PageableListApp extends App {
child: new Theme(
data: new ThemeData(
brightness: ThemeBrightness.light,
primarySwatch: Blue,
accentColor: RedAccent[200]
primarySwatch: Colors.blue,
accentColor: Colors.redAccent[200]
),
child: new Title(
title: 'PageableList',

View File

@@ -4,9 +4,9 @@
import 'package:mojo/mojo/url_response.mojom.dart';
import 'package:sky_services/media/media.mojom.dart';
import 'package:sky/services.dart';
import 'package:sky/material.dart';
import 'package:sky/rendering.dart';
import 'package:sky/theme/colors.dart' as colors;
import 'package:sky/services.dart';
import 'package:sky/widgets.dart';
// All of these sounds are marked as public domain at soundbible.
@@ -42,12 +42,12 @@ class Key {
class PianoApp extends App {
final List<Key> keys = [
new Key(colors.Red[500], chimes),
new Key(colors.Orange[500], chainsaw),
new Key(colors.Yellow[500], stag),
new Key(colors.Green[500], frogs),
new Key(colors.Blue[500], rattle),
new Key(colors.Purple[500], iLoveYou),
new Key(Colors.red[500], chimes),
new Key(Colors.orange[500], chainsaw),
new Key(Colors.yellow[500], stag),
new Key(Colors.green[500], frogs),
new Key(Colors.blue[500], rattle),
new Key(Colors.purple[500], iLoveYou),
];
PianoApp() {

View File

@@ -3,7 +3,7 @@
// found in the LICENSE file.
import 'package:sky/animation.dart';
import 'package:sky/theme/colors.dart' as colors;
import 'package:sky/material.dart';
import 'package:sky/widgets.dart';
class ProgressIndicatorApp extends App {
@@ -90,8 +90,8 @@ class ProgressIndicatorApp extends App {
child: new Theme(
data: new ThemeData(
brightness: ThemeBrightness.light,
primarySwatch: colors.Blue,
accentColor: colors.RedAccent[200]
primarySwatch: Colors.blue,
accentColor: Colors.redAccent[200]
),
child: new Title(
title: 'Cards',

View File

@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:sky/material.dart';
import 'package:sky/rendering.dart';
import 'package:sky/theme/colors.dart' as colors;
import 'package:sky/widgets.dart';
class ScaleApp extends App {
@@ -41,7 +41,7 @@ class ScaleApp extends App {
double radius = size.width / 2.0 * _zoom;
Gradient gradient = new RadialGradient(
center: center, radius: radius,
colors: [colors.Blue[200], colors.Blue[800]]
colors: [Colors.blue[200], Colors.blue[800]]
);
Paint paint = new Paint()
..shader = gradient.createShader();

View File

@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:sky/material.dart';
import 'package:sky/rendering.dart';
import 'package:sky/theme/colors.dart' as colors;
import 'package:sky/widgets.dart';
class StyledTextApp extends App {
@@ -32,8 +32,8 @@ HAL: This mission is too important for me to allow you to jeopardize it.''';
// [["Dave", "Open the pod bay..."] ...]
List<List<String>> nameLines;
final TextStyle daveStyle = new TextStyle(color: colors.Indigo[400], height: 1.8);
final TextStyle halStyle = new TextStyle(color: colors.Red[400], fontFamily: "monospace");
final TextStyle daveStyle = new TextStyle(color: Colors.indigo[400], height: 1.8);
final TextStyle halStyle = new TextStyle(color: Colors.red[400], fontFamily: "monospace");
final TextStyle boldStyle = const TextStyle(fontWeight: bold);
final TextStyle underlineStyle = const TextStyle(
decoration: underline,
@@ -100,7 +100,7 @@ HAL: This mission is too important for me to allow you to jeopardize it.''';
data: new ThemeData.light(),
child: new Scaffold(
body: new Material(
color: colors.Grey[50],
color: Colors.grey[50],
child: interactiveBody
),
toolbar: new ToolBar(

View File

@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:sky/theme/typography.dart' as typography;
import 'package:sky/material.dart';
import 'package:sky/widgets.dart';
class TabbedNavigatorApp extends App {
@@ -122,7 +122,7 @@ class TabbedNavigatorApp extends App {
assert(selectedIndices.length == 5);
ToolBar toolbar = new ToolBar(
center: new Text('Tabbed Navigator', style: typography.white.title)
center: new Text('Tabbed Navigator', style: Typography.white.title)
);
return new Scaffold(