mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
fixed button validation
This commit is contained in:
@ -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'),
|
||||
|
Reference in New Issue
Block a user