mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
Replaced conditional with an if statement in TagChipDisplay
.
This commit is contained in:
@ -40,11 +40,11 @@ class TagChipDisplay extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return (spaceModel?.tags?.isNotEmpty == true ||
|
if ((spaceModel?.tags?.isNotEmpty == true ||
|
||||||
spaceModel?.subspaceModels
|
spaceModel?.subspaceModels
|
||||||
?.any((subspace) => subspace.tags?.isNotEmpty == true) ==
|
?.any((subspace) => subspace.tags?.isNotEmpty == true) ==
|
||||||
true)
|
true)) {
|
||||||
? SizedBox(
|
return SizedBox(
|
||||||
width: screenWidth * 0.25,
|
width: screenWidth * 0.25,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
@ -115,8 +115,9 @@ class TagChipDisplay extends StatelessWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
);
|
||||||
: TextButton(
|
} else {
|
||||||
|
return TextButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
showDialog<void>(
|
showDialog<void>(
|
||||||
context: context,
|
context: context,
|
||||||
@ -143,3 +144,4 @@ class TagChipDisplay extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user