sort groups by creation date in GroupsView
This commit is contained in:
@@ -69,9 +69,9 @@ class _GroupsViewState extends State<GroupsView> {
|
|||||||
}
|
}
|
||||||
final bool isLoading =
|
final bool isLoading =
|
||||||
snapshot.connectionState == ConnectionState.waiting;
|
snapshot.connectionState == ConnectionState.waiting;
|
||||||
final List<Group> groups = isLoading
|
final List<Group> groups =
|
||||||
? skeletonData
|
isLoading ? skeletonData : (snapshot.data ?? [])
|
||||||
: (snapshot.data ?? []);
|
..sort((a, b) => b.createdAt.compareTo(a.createdAt));
|
||||||
return Skeletonizer(
|
return Skeletonizer(
|
||||||
effect: PulseEffect(
|
effect: PulseEffect(
|
||||||
from: Colors.grey[800]!,
|
from: Colors.grey[800]!,
|
||||||
|
|||||||
Reference in New Issue
Block a user