refactor: simplify tag checking logic to enhance readability.

This commit is contained in:
Faris Armoush
2025-04-15 15:08:30 +03:00
parent a66784473f
commit be168aed93

View File

@ -40,10 +40,11 @@ class TagChipDisplay extends StatelessWidget {
@override
Widget build(BuildContext context) {
if ((spaceModel?.tags?.isNotEmpty == true ||
spaceModel?.subspaceModels
?.any((subspace) => subspace.tags?.isNotEmpty == true) ==
true)) {
final hasTags = spaceModel?.tags?.isNotEmpty ?? false;
final hasSubspaceTags =
spaceModel?.subspaceModels?.any((e) => e.tags?.isNotEmpty ?? false) ?? false;
if (hasTags || hasSubspaceTags) {
return SizedBox(
width: screenWidth * 0.25,
child: Container(