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

Unified Diff: sky/examples/stocks2/lib/stock_row.dart

Issue 1178913003: Add support for text styles. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Fix test per jackson's review Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: sky/examples/stocks2/lib/stock_row.dart
diff --git a/sky/examples/stocks2/lib/stock_row.dart b/sky/examples/stocks2/lib/stock_row.dart
index fc0555bce72131ab34788224bd9ef536902fa699..4fe8f0406d1f6b3ea3e8d46a63796dc8097c6c29 100644
--- a/sky/examples/stocks2/lib/stock_row.dart
+++ b/sky/examples/stocks2/lib/stock_row.dart
@@ -5,8 +5,10 @@
import 'dart:sky' as sky;
import 'package:sky/framework/rendering/box.dart';
-import 'package:sky/framework/widgets/wrappers.dart';
+import 'package:sky/framework/theme2/typography.dart' as typography;
import 'package:sky/framework/widgets/ink_well.dart';
+import 'package:sky/framework/widgets/wrappers.dart';
+import 'package:sky/framework/rendering/paragraph.dart';
import 'stock_arrow.dart';
import 'stock_data.dart';
@@ -31,9 +33,12 @@ class StockRow extends Component {
margin: const EdgeDims.only(right: 5.0)),
new FlexExpandingChild(new Text(stock.symbol), flex: 2, key: "symbol"),
// TODO(hansmuller): text-align: right
- new FlexExpandingChild(new Text(lastSale), key: "lastSale"),
- // TODO(hansmuller): text-align: right, ${typography.black.caption};
- new FlexExpandingChild(new Text(changeInPrice), key: "changeInPrice")
+ new FlexExpandingChild(new Text(lastSale,
+ style: const TextStyle(textAlign: TextAlign.right)),
+ key: "lastSale"),
+ new FlexExpandingChild(new Text(changeInPrice,
+ style: typography.black.caption.copyWith(textAlign: TextAlign.right)),
+ key: "changeInPrice")
];
// TODO(hansmuller): An explicit |height| shouldn't be needed

Powered by Google App Engine
This is Rietveld 408576698