getLargestAssets method

List<AssetDetail> getLargestAssets(
  1. int limit
)

Implementation

List<AssetDetail> getLargestAssets(int limit) {
  final sorted = List<AssetDetail>.from(assets)
    ..sort((a, b) => b.info.size.compareTo(a.info.size));
  return sorted.take(limit).toList();
}