Replaced conditional with an if statement in TagChipDisplay.

This commit is contained in:
Faris Armoush
2025-04-15 15:06:01 +03:00
parent c0a963ded5
commit a66784473f

View File

@ -40,11 +40,11 @@ class TagChipDisplay extends StatelessWidget {
@override
Widget build(BuildContext context) {
return (spaceModel?.tags?.isNotEmpty == true ||
if ((spaceModel?.tags?.isNotEmpty == true ||
spaceModel?.subspaceModels
?.any((subspace) => subspace.tags?.isNotEmpty == true) ==
true)
? SizedBox(
true)) {
return SizedBox(
width: screenWidth * 0.25,
child: Container(
padding: const EdgeInsets.all(8.0),
@ -115,8 +115,9 @@ class TagChipDisplay extends StatelessWidget {
],
),
),
)
: TextButton(
);
} else {
return TextButton(
onPressed: () {
showDialog<void>(
context: context,
@ -142,4 +143,5 @@ class TagChipDisplay extends StatelessWidget {
),
);
}
}
}