Make UINode's key a String

We need the key to be a String even though we claimed we could support any
Object. Also, clean up some style nits including shortening the |root| getters
on OneChildRenderNodeWrappers.

Fixes https://github.com/domokit/sky_sdk/issues/26.

TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1173293005.
This commit is contained in:
Adam Barth
2015-06-15 21:39:09 -07:00
parent 4ca9ab2214
commit 395f92ba08
4 changed files with 4 additions and 4 deletions

View File

@@ -12,7 +12,7 @@ import 'package:sky/widgets/basic.dart';
class StockArrow extends Component {
StockArrow({ Object key, this.percentChange }) : super(key: key);
StockArrow({ String key, this.percentChange }) : super(key: key);
final double percentChange;

View File

@@ -11,7 +11,7 @@ import 'stock_row.dart';
class Stocklist extends FixedHeightScrollable {
Stocklist({
Object key,
String key,
this.stocks,
this.query
}) : super(itemHeight: StockRow.kHeight, key: key);

View File

@@ -10,7 +10,7 @@ import 'package:sky/framework/theme/view_configuration.dart';
class StockMenu extends Component {
StockMenu({
Object key,
String key,
this.controller,
this.autorefresh: false,
this.onAutorefreshChanged

View File

@@ -24,7 +24,7 @@ void addFlexChildSolidColor(RenderFlex parent, sky.Color backgroundColor, { int
// Solid colour, Widget version
class Rectangle extends Component {
Rectangle(this.color, { Object key }) : super(key: key);
Rectangle(this.color, { String key }) : super(key: key);
final Color color;
UINode build() {
return new Flexible(