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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user