fixed button validation

This commit is contained in:
hannathkadher
2025-01-23 11:45:11 +04:00
parent 24f7ab6af8
commit 7268253e35

View File

@ -157,7 +157,7 @@ class CreateSpaceModelDialog extends StatelessWidget {
const SizedBox(width: 10),
Expanded(
child: DefaultButton(
onPressed: state.errorMessage == null ||
onPressed: state.errorMessage == null &&
isNameValid
? () {
final updatedSpaceTemplate =
@ -236,7 +236,8 @@ class CreateSpaceModelDialog extends StatelessWidget {
: null,
backgroundColor: ColorsManager.secondaryColor,
borderRadius: 10,
foregroundColor: isNameValid
foregroundColor: state.errorMessage == null &&
isNameValid
? ColorsManager.whiteColors
: ColorsManager.whiteColorsWithOpacity,
child: const Text('OK'),