remove if body isnotempty

This commit is contained in:
Valentin CZERYBA 2025-06-25 21:14:45 +02:00
parent 4f4b0b609c
commit 7441af6f13

View File

@ -484,15 +484,13 @@ class _MyHomePageState extends State<ListItemMenu> {
// Update state after getting the response
setState(() {
if (body.isNotEmpty) {
int counter = filteredPosts.length;
// If we have results, map them to Events
filteredPosts = body
.map((e) => Events.fromJson(e as Map<String, dynamic>))
.toList();
if (counter == filteredPosts.length) {
_fetchCount--;
}
int counter = filteredPosts.length;
// If we have results, map them to Events
filteredPosts = body
.map((e) => Events.fromJson(e as Map<String, dynamic>))
.toList();
if (counter == filteredPosts.length) {
_fetchCount--;
}
});
} else {