Make it possible to construct a Stock directly

We were missing the ability to initialize one of the fields.

TBR=rafaelw@chromium.org

Review URL: https://codereview.chromium.org/1027293003
This commit is contained in:
Adam Barth
2015-03-23 11:23:48 -07:00
parent cc1c9cb9fc
commit 7818b1c0bb

View File

@@ -23,7 +23,7 @@ class Stock {
String marketCap;
double percentChange;
Stock(this.symbol, this.name, this.lastSale, this.marketCap);
Stock(this.symbol, this.name, this.lastSale, this.marketCap, this.percentChange);
Stock.fromFields(List<String> fields) {
// FIXME: This class should only have static data, not lastSale, etc.