mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
fixed button validation
This commit is contained in:
@ -157,7 +157,7 @@ class CreateSpaceModelDialog extends StatelessWidget {
|
|||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: DefaultButton(
|
child: DefaultButton(
|
||||||
onPressed: state.errorMessage == null ||
|
onPressed: state.errorMessage == null &&
|
||||||
isNameValid
|
isNameValid
|
||||||
? () {
|
? () {
|
||||||
final updatedSpaceTemplate =
|
final updatedSpaceTemplate =
|
||||||
@ -236,7 +236,8 @@ class CreateSpaceModelDialog extends StatelessWidget {
|
|||||||
: null,
|
: null,
|
||||||
backgroundColor: ColorsManager.secondaryColor,
|
backgroundColor: ColorsManager.secondaryColor,
|
||||||
borderRadius: 10,
|
borderRadius: 10,
|
||||||
foregroundColor: isNameValid
|
foregroundColor: state.errorMessage == null &&
|
||||||
|
isNameValid
|
||||||
? ColorsManager.whiteColors
|
? ColorsManager.whiteColors
|
||||||
: ColorsManager.whiteColorsWithOpacity,
|
: ColorsManager.whiteColorsWithOpacity,
|
||||||
child: const Text('OK'),
|
child: const Text('OK'),
|
||||||
|
Reference in New Issue
Block a user