mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-11-27 00:14:56 +00:00
edit and create
This commit is contained in:
@ -67,11 +67,25 @@ class SpaceModelPage extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
// Render existing space model
|
// Render existing space model
|
||||||
final model = spaceModels[index];
|
final model = spaceModels[index];
|
||||||
return Container(
|
return GestureDetector(
|
||||||
margin: const EdgeInsets.all(8.0),
|
onTap: () {
|
||||||
child: SpaceModelCardWidget(model:model),
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext dialogContext) {
|
||||||
|
return CreateSpaceModelDialog(
|
||||||
|
products: products,
|
||||||
|
allTags: allTagValues,
|
||||||
|
spaceModel: model,
|
||||||
|
onLoad: (newModel) {},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: const EdgeInsets.all(8.0),
|
||||||
|
child: SpaceModelCardWidget(model: model),
|
||||||
|
));
|
||||||
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@ -72,7 +72,7 @@ class CreateSpaceModelDialog extends StatelessWidget {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'Create New Space Model',
|
spaceModel?.uuid == null ? 'Create New Space Model': 'Edit Space Model',
|
||||||
style: Theme.of(context)
|
style: Theme.of(context)
|
||||||
.textTheme
|
.textTheme
|
||||||
.headlineLarge
|
.headlineLarge
|
||||||
|
|||||||
Reference in New Issue
Block a user