From 4907eb9f2c4c873f778a5d5470e1122934070580 Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Fri, 3 Feb 2023 23:39:45 +0100 Subject: [PATCH] fix(ui): Fix search list --- lib/src/ui/pages/anime_search.dart | 96 +++++++++++++++--------------- 1 file changed, 49 insertions(+), 47 deletions(-) diff --git a/lib/src/ui/pages/anime_search.dart b/lib/src/ui/pages/anime_search.dart index 27e7b36..5102feb 100644 --- a/lib/src/ui/pages/anime_search.dart +++ b/lib/src/ui/pages/anime_search.dart @@ -52,59 +52,61 @@ class AnimeSearchPage extends StatelessWidget { ), ) else - ListView.builder( - shrinkWrap: true, - itemCount: state.searchResults.length, - itemBuilder: (context, index) { - final item = state.searchResults[index]; - return InkWell( - onTap: () { - context.read().add( - AnimeAddedEvent(item), - ); - }, - child: Padding( - padding: const EdgeInsets.all(8), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AnimeCoverImage( - url: item.thumbnailUrl, - ), + Expanded( + child: ListView.builder( + //shrinkWrap: true, + itemCount: state.searchResults.length, + itemBuilder: (context, index) { + final item = state.searchResults[index]; + return InkWell( + onTap: () { + context.read().add( + AnimeAddedEvent(item), + ); + }, + child: Padding( + padding: const EdgeInsets.all(8), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AnimeCoverImage( + url: item.thumbnailUrl, + ), - Expanded( - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 8), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Text( - item.title, - style: Theme.of(context).textTheme.titleLarge, - maxLines: 2, - softWrap: true, - overflow: TextOverflow.ellipsis, - ), + Expanded( + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 8), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + item.title, + style: Theme.of(context).textTheme.titleLarge, + maxLines: 2, + softWrap: true, + overflow: TextOverflow.ellipsis, + ), - Text( - item.description, - style: Theme.of(context).textTheme.bodyMedium, - maxLines: 4, - softWrap: true, - overflow: TextOverflow.ellipsis, - ), - ], + Text( + item.description, + style: Theme.of(context).textTheme.bodyMedium, + maxLines: 4, + softWrap: true, + overflow: TextOverflow.ellipsis, + ), + ], + ), ), ), - ), - ], + ], + ), ), - ), - ); - } + ); + } + ), ), - ], - ), + ], + ), ); }, );