From e0633e05f66eb1d5a4486c19abafe7f944520be3 Mon Sep 17 00:00:00 2001 From: glenn2030 Date: Wed, 2 Aug 2023 15:03:26 +0800 Subject: [PATCH] fix scroll --- lib/screens/friendcards/friendscardpage.dart | 35 ++++++++++---------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/lib/screens/friendcards/friendscardpage.dart b/lib/screens/friendcards/friendscardpage.dart index ab9b54c..ab7b7a5 100644 --- a/lib/screens/friendcards/friendscardpage.dart +++ b/lib/screens/friendcards/friendscardpage.dart @@ -229,24 +229,25 @@ class _FriendsCardsPageState extends State { Expanded( child: TabBarView( children: [ - Column( - children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: TextField( - onChanged: _filterUsers, - controller: _searchController, - decoration: InputDecoration( - labelText: 'Search for Friends', - prefixIcon: const Icon(Icons.search), - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(20.0), + SingleChildScrollView( + // Wrap this in SingleChildScrollView + child: Column( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: TextField( + onChanged: _filterUsers, + controller: _searchController, + decoration: InputDecoration( + labelText: 'Search for Friends', + prefixIcon: const Icon(Icons.search), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(20.0), + ), ), ), ), - ), - Expanded( - child: ListView.separated( + ListView.separated( shrinkWrap: true, physics: const NeverScrollableScrollPhysics(), itemCount: filteredFriends.isNotEmpty @@ -319,8 +320,8 @@ class _FriendsCardsPageState extends State { ); }, ), - ), - ], + ], + ), ), ListView.builder( physics: const NeverScrollableScrollPhysics(),