added create

This commit is contained in:
hannathkadher
2025-01-08 21:06:31 +04:00
parent 17e025b69f
commit 48c064c711
2 changed files with 5 additions and 4 deletions

View File

@ -37,9 +37,9 @@ class CreateSpaceModelBloc
tags: tagBodyModels,
subspaceModels: subspaceTemplateBodyModels);
final success = await _api.createSpaceModel(spaceModelBody);
await _api.createSpaceModel(spaceModelBody);
} catch (e) {
print(e);
emit(CreateSpaceModelError('Error creating space model'));
}
});
@ -86,8 +86,7 @@ class CreateSpaceModelBloc
currentState.space,
errorMessage: "Model name cannot be empty",
));
print('State emitted: CreateSpaceModelLoaded with updated model:');
print('State emitted: CreateSpaceModelLoaded with updated model:');
} else {
final updatedSpaceModel =
currentState.space.copyWith(modelName: event.name);

View File

@ -145,6 +145,8 @@ class CreateSpaceModelDialog extends StatelessWidget {
spaceTemplate:
updatedSpaceTemplate),
);
Navigator.of(context).pop();
}
: null,
backgroundColor: ColorsManager.secondaryColor,