diff --git a/lib/view/locationSearch.dart b/lib/view/locationSearch.dart index e79a295..cda4eb4 100644 --- a/lib/view/locationSearch.dart +++ b/lib/view/locationSearch.dart @@ -38,8 +38,18 @@ class LocationSearchDelegate extends SearchDelegate { case ConnectionState.active: case ConnectionState.none: case ConnectionState.done: + if ((snapshot.data?.length ?? 0) == 0) { + return const Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox(height: 50), + Text("Keine Sucherergebnisse gefunden") + ], + ); + } return ListView.builder( - itemCount: snapshot.data?.length ?? 0, + itemCount: snapshot.data!.length, itemBuilder: (context, index) { Place place = snapshot.data![index]; return ListTile(