Fix category bug around "empty" category
This commit is contained in:
parent
5eb90ac1e1
commit
e18abcdcb8
@ -122,7 +122,6 @@ class CategoriesAPI extends ChangeNotifier {
|
||||
Query.orderAsc("number"),
|
||||
]);
|
||||
_categories = response.documents;
|
||||
_categories.removeWhere((element) => element.data['number'] == -1);
|
||||
notifyListeners();
|
||||
_ready = true;
|
||||
}
|
||||
|
||||
@ -42,10 +42,13 @@ class _CategoriesPageState extends State<CategoriesPage> {
|
||||
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(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user