mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-11-27 21:44:55 +00:00
@ -18,10 +18,8 @@ class SpaceModelPage extends StatelessWidget {
|
||||
final List<Tag> projectTags;
|
||||
|
||||
const SpaceModelPage(
|
||||
{super.key,
|
||||
this.products,
|
||||
this.onSpaceModelsUpdated,
|
||||
required this.projectTags});
|
||||
{Key? key, this.products, this.onSpaceModelsUpdated, required this.projectTags})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -79,8 +77,7 @@ class SpaceModelPage extends StatelessWidget {
|
||||
}
|
||||
// Render existing space model
|
||||
final model = spaceModels[index];
|
||||
final otherModel =
|
||||
List<String>.from(allSpaceModelNames);
|
||||
final otherModel = List<String>.from(allSpaceModelNames);
|
||||
otherModel.remove(model.modelName);
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
@ -118,10 +115,8 @@ class SpaceModelPage extends StatelessWidget {
|
||||
return Center(
|
||||
child: Text(
|
||||
'Error: ${state.message}',
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodySmall
|
||||
?.copyWith(color: ColorsManager.warningRed),
|
||||
style:
|
||||
Theme.of(context).textTheme.bodySmall?.copyWith(color: ColorsManager.warningRed),
|
||||
),
|
||||
);
|
||||
}
|
||||
@ -131,7 +126,7 @@ class SpaceModelPage extends StatelessWidget {
|
||||
}
|
||||
|
||||
double _calculateChildAspectRatio(BuildContext context) {
|
||||
final screenWidth = MediaQuery.of(context).size.width;
|
||||
double screenWidth = MediaQuery.of(context).size.width;
|
||||
if (screenWidth > 1600) {
|
||||
return 1.5; // Decrease to make cards taller
|
||||
}
|
||||
@ -145,7 +140,7 @@ class SpaceModelPage extends StatelessWidget {
|
||||
}
|
||||
|
||||
List<String> _getAllTagValues(List<SpaceTemplateModel> spaceModels) {
|
||||
final allTags = <String>[];
|
||||
final List<String> allTags = [];
|
||||
for (final spaceModel in spaceModels) {
|
||||
if (spaceModel.tags != null) {
|
||||
allTags.addAll(spaceModel.listAllTagValues());
|
||||
@ -155,7 +150,7 @@ class SpaceModelPage extends StatelessWidget {
|
||||
}
|
||||
|
||||
List<String> _getAllSpaceModelName(List<SpaceTemplateModel> spaceModels) {
|
||||
final names = <String>[];
|
||||
final List<String> names = [];
|
||||
for (final spaceModel in spaceModels) {
|
||||
names.add(spaceModel.modelName);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user