mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
refactor: simplify tag checking logic to enhance readability.
This commit is contained in:
@ -40,10 +40,11 @@ class TagChipDisplay extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
if ((spaceModel?.tags?.isNotEmpty == true ||
|
final hasTags = spaceModel?.tags?.isNotEmpty ?? false;
|
||||||
spaceModel?.subspaceModels
|
final hasSubspaceTags =
|
||||||
?.any((subspace) => subspace.tags?.isNotEmpty == true) ==
|
spaceModel?.subspaceModels?.any((e) => e.tags?.isNotEmpty ?? false) ?? false;
|
||||||
true)) {
|
|
||||||
|
if (hasTags || hasSubspaceTags) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: screenWidth * 0.25,
|
width: screenWidth * 0.25,
|
||||||
child: Container(
|
child: Container(
|
||||||
|
Reference in New Issue
Block a user