edit and create

This commit is contained in:
hannathkadher
2025-01-20 10:28:46 +04:00
parent 440263e2f9
commit fe680d15f2
2 changed files with 23 additions and 9 deletions

View File

@ -67,10 +67,24 @@ class SpaceModelPage extends StatelessWidget {
}
// Render existing space model
final model = spaceModels[index];
return Container(
margin: const EdgeInsets.all(8.0),
child: SpaceModelCardWidget(model:model),
);
return GestureDetector(
onTap: () {
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),
));
},
),
),

View File

@ -72,7 +72,7 @@ class CreateSpaceModelDialog extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
children: [
Text(
'Create New Space Model',
spaceModel?.uuid == null ? 'Create New Space Model': 'Edit Space Model',
style: Theme.of(context)
.textTheme
.headlineLarge