diff --git a/ltx_flutter/lib/appwrite/categories_api.dart b/ltx_flutter/lib/appwrite/categories_api.dart index df55547..9a0fb93 100644 --- a/ltx_flutter/lib/appwrite/categories_api.dart +++ b/ltx_flutter/lib/appwrite/categories_api.dart @@ -122,7 +122,6 @@ class CategoriesAPI extends ChangeNotifier { Query.orderAsc("number"), ]); _categories = response.documents; - _categories.removeWhere((element) => element.data['number'] == -1); notifyListeners(); _ready = true; } diff --git a/ltx_flutter/lib/pages/categories_page.dart b/ltx_flutter/lib/pages/categories_page.dart index c17287e..9e6da97 100644 --- a/ltx_flutter/lib/pages/categories_page.dart +++ b/ltx_flutter/lib/pages/categories_page.dart @@ -42,10 +42,13 @@ class _CategoriesPageState extends State { height: 0, thickness: 2, ), - CategoryRow(category: category), + category.number == -1 + ? SizedBox.shrink() + : CategoryRow(category: category), ], ); } + return CategoryRow(category: category); } return null; @@ -79,7 +82,7 @@ class CategoryRow extends StatelessWidget { child: Row( children: [ Container( - constraints: BoxConstraints(maxHeight: 80, maxWidth: 70), + constraints: BoxConstraints(maxHeight: 100, maxWidth: 70), color: category.backgroundColor, child: SizedBox.expand( child: Center(