Move us to HashSet to avoid the overhead of tracking the order

This commit is contained in:
Ian Hickson
2016-01-19 09:31:57 -08:00
parent b9716b84db
commit 5494323db9
13 changed files with 39 additions and 31 deletions

View File

@@ -5,6 +5,7 @@
library stocks;
import 'dart:async';
import 'dart:collection';
import 'dart:math' as math;
import 'dart:ui' as ui;

View File

@@ -203,7 +203,7 @@ class StockHomeState extends State<StockHome> {
stocks: stocks.toList(),
onAction: _buyStock,
onOpen: (Stock stock, Key arrowKey) {
Set<Key> mostValuableKeys = new Set<Key>();
Set<Key> mostValuableKeys = new HashSet<Key>();
mostValuableKeys.add(arrowKey);
Navigator.pushNamed(context, '/stock/${stock.symbol}', mostValuableKeys: mostValuableKeys);
},