fixed the edit flow for space model

This commit is contained in:
hannathkadher
2025-01-22 12:49:47 +04:00
parent 7ffdc67016
commit f35b699d4c
24 changed files with 517 additions and 127 deletions

View File

@ -186,8 +186,7 @@ class CreateSubSpaceModelDialog extends StatelessWidget {
const SizedBox(width: 10),
Expanded(
child: DefaultButton(
onPressed: (state.subSpaces.isEmpty ||
state.errorMessage.isNotEmpty)
onPressed: (state.errorMessage.isNotEmpty)
? null
: () async {
final subSpaces = context
@ -201,8 +200,7 @@ class CreateSubSpaceModelDialog extends StatelessWidget {
},
backgroundColor: ColorsManager.secondaryColor,
borderRadius: 10,
foregroundColor: state.subSpaces.isEmpty ||
state.errorMessage.isNotEmpty
foregroundColor: state.errorMessage.isNotEmpty
? ColorsManager.whiteColorsWithOpacity
: ColorsManager.whiteColors,
child: const Text('OK'),