fix: some fixes
This commit is contained in:
@@ -73,6 +73,7 @@ class _MainPageState extends State<MainPage> {
|
||||
bool isSearching = false;
|
||||
List<GymCategory> categories = [];
|
||||
GymCategory? selectedCategory;
|
||||
final ScrollController _scrollController = ScrollController();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -122,7 +123,7 @@ class _MainPageState extends State<MainPage> {
|
||||
});
|
||||
}
|
||||
|
||||
void _onSearch() async {
|
||||
void _onSearch() {
|
||||
final categoryId = selectedCategory == null ? '' : selectedCategory!.id;
|
||||
_searchItems(searchText: searchText, categoryId: categoryId);
|
||||
}
|
||||
@@ -250,7 +251,9 @@ class _MainPageState extends State<MainPage> {
|
||||
onEndOfPage: _onLoad,
|
||||
isLoading: isLoading,
|
||||
child: Scrollbar(
|
||||
controller: _scrollController,
|
||||
child: ListView(
|
||||
controller: _scrollController,
|
||||
children: [
|
||||
filteredData.isEmpty &&
|
||||
(searchText != '' || selectedCategory != null) &&
|
||||
|
||||
Reference in New Issue
Block a user