Move us to HashSet to avoid the overhead of tracking the order
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
library stocks;
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:collection';
|
||||
import 'dart:math' as math;
|
||||
import 'dart:ui' as ui;
|
||||
|
||||
|
||||
@@ -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);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user