mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
added create
This commit is contained in:
@ -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);
|
||||
|
@ -145,6 +145,8 @@ class CreateSpaceModelDialog extends StatelessWidget {
|
||||
spaceTemplate:
|
||||
updatedSpaceTemplate),
|
||||
);
|
||||
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
: null,
|
||||
backgroundColor: ColorsManager.secondaryColor,
|
||||
|
Reference in New Issue
Block a user