added validity for reusing space name in same layer

This commit is contained in:
hannathkadher
2024-11-27 22:41:18 +04:00
parent 448e798da1
commit 22a9ee5a14
2 changed files with 33 additions and 11 deletions

View File

@ -270,6 +270,7 @@ class _CommunityStructureAreaState extends State<CommunityStructureArea> {
builder: (BuildContext context) {
return CreateSpaceDialog(
products: widget.products,
parentSpace: parentIndex != null? spaces[parentIndex] : null,
onCreateSpace: (String name, String icon, List<SelectedProduct> selectedProducts) {
setState(() {
// Set the first space in the center or use passed position