Fix immutability

This commit is contained in:
shilangyu 2022-05-03 09:48:04 +02:00
parent 5068eb900f
commit ab1873a19f
1 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,6 @@
import 'dart:async';
import 'package:collection/collection.dart';
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:fuzzy/fuzzy.dart';
@ -112,8 +113,11 @@ class CommunitiesTab extends HookWidget {
final instances = instancesRefreshable.snapshot.data!;
final communities = communitiesRefreshable.snapshot.data!
..forEach((e) =>
e.sort((a, b) => a.community.name.compareTo(b.community.name)));
.map(
(e) =>
e.sorted((a, b) => a.community.name.compareTo(b.community.name)),
)
.toList();
final filterIcon = () {
if (filterController.text.isEmpty) {