Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/features/extensions/extension_stats_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,9 @@ class _ExtensionStatsViewState extends material.State<ExtensionStatsView> {
mainAxisSpacing: 16,
mainAxisExtent: _summaryChipHeight,
),
children: chips.map((c) => _buildChip(cs, c)).toList(),
children: [
for (final c in chips) _buildChip(cs, c),
],
);
},
);
Expand Down
2 changes: 1 addition & 1 deletion lib/features/mongodb/mongo_stats_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ class _MongoStatsViewState extends material.State<MongoStatsView> {
title,
_twoColumnMetrics(
context,
data.entries.map((e) => MapEntry(e.key, e.value)).toList(),
[ for (final e in data.entries) MapEntry(e.key, e.value) ],
),
);
}
Expand Down
11 changes: 5 additions & 6 deletions lib/features/redis/redis_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -680,19 +680,18 @@ class _RedisViewState extends material.State<RedisView> {
{List<String>? keys}) {
if (data == null || data.isEmpty) return const material.SizedBox.shrink();
final entries = keys != null
? keys
.map((k) => MapEntry(k, data[k]))
.where((e) => e.value != null)
.map((e) => MapEntry(e.key, e.value as String))
.toList()
? <MapEntry<String, String>>[
for (final k in keys)
if (data[k] != null) MapEntry(k, data[k]!),
]
: data.entries.toList();
if (entries.isEmpty) return const material.SizedBox.shrink();
return _card(
context,
title,
_twoColumnMetrics(
context,
entries.map((e) => MapEntry(_labelFor(e.key), e.value)).toList(),
[ for (final e in entries) MapEntry(_labelFor(e.key), e.value) ],
),
);
}
Expand Down
5 changes: 3 additions & 2 deletions lib/shared/widgets/querya_dropdown.dart
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,9 @@ class _QueryaDropdownState<T> extends material.State<QueryaDropdown<T>> {
}
_cachedMenuItems = List<QueryaDropdownItem<T>>.from(widget.items);
_cachedMenuValue = widget.value;
_cachedMenuChildren =
widget.items.map((item) => _menuItem(item, cs)).toList();
_cachedMenuChildren = [
for (final item in widget.items) _menuItem(item, cs),
];
return _cachedMenuChildren!;
}

Expand Down
Loading