mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
fixed UI alignment
This commit is contained in:
@ -149,50 +149,53 @@ class CreateSpaceDialogState extends State<CreateSpaceDialog> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
TextField(
|
SizedBox(
|
||||||
controller: nameController,
|
width: screenWidth * 0.25,
|
||||||
onChanged: (value) {
|
child: TextField(
|
||||||
enteredName = value.trim();
|
controller: nameController,
|
||||||
setState(() {
|
onChanged: (value) {
|
||||||
isNameFieldExist = false;
|
enteredName = value.trim();
|
||||||
isOkButtonEnabled = false;
|
setState(() {
|
||||||
isNameFieldInvalid = value.isEmpty;
|
isNameFieldExist = false;
|
||||||
|
isOkButtonEnabled = false;
|
||||||
|
isNameFieldInvalid = value.isEmpty;
|
||||||
|
|
||||||
if (!isNameFieldInvalid) {
|
if (!isNameFieldInvalid) {
|
||||||
if (_isNameConflict(value)) {
|
if (_isNameConflict(value)) {
|
||||||
isNameFieldExist = true;
|
isNameFieldExist = true;
|
||||||
isOkButtonEnabled = false;
|
isOkButtonEnabled = false;
|
||||||
} else {
|
} else {
|
||||||
isNameFieldExist = false;
|
isNameFieldExist = false;
|
||||||
isOkButtonEnabled = true;
|
isOkButtonEnabled = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
});
|
},
|
||||||
},
|
style: const TextStyle(color: Colors.black),
|
||||||
style: const TextStyle(color: Colors.black),
|
decoration: InputDecoration(
|
||||||
decoration: InputDecoration(
|
hintText: 'Please enter the name',
|
||||||
hintText: 'Please enter the name',
|
hintStyle: const TextStyle(
|
||||||
hintStyle: const TextStyle(
|
fontSize: 14,
|
||||||
fontSize: 14,
|
color: ColorsManager.lightGrayColor,
|
||||||
color: ColorsManager.lightGrayColor,
|
fontWeight: FontWeight.w400,
|
||||||
fontWeight: FontWeight.w400,
|
|
||||||
),
|
|
||||||
filled: true,
|
|
||||||
fillColor: ColorsManager.boxColor,
|
|
||||||
enabledBorder: OutlineInputBorder(
|
|
||||||
borderRadius: BorderRadius.circular(10),
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: isNameFieldInvalid || isNameFieldExist
|
|
||||||
? ColorsManager.red
|
|
||||||
: ColorsManager.boxColor,
|
|
||||||
width: 1.5,
|
|
||||||
),
|
),
|
||||||
),
|
filled: true,
|
||||||
focusedBorder: OutlineInputBorder(
|
fillColor: ColorsManager.boxColor,
|
||||||
borderRadius: BorderRadius.circular(10),
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: const BorderSide(
|
borderRadius: BorderRadius.circular(10),
|
||||||
color: ColorsManager.boxColor,
|
borderSide: BorderSide(
|
||||||
width: 1.5,
|
color: isNameFieldInvalid || isNameFieldExist
|
||||||
|
? ColorsManager.red
|
||||||
|
: ColorsManager.boxColor,
|
||||||
|
width: 1.5,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
borderSide: const BorderSide(
|
||||||
|
color: ColorsManager.boxColor,
|
||||||
|
width: 1.5,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -222,6 +225,9 @@ class CreateSpaceDialogState extends State<CreateSpaceDialog> {
|
|||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
selectedSpaceModel == null
|
selectedSpaceModel == null
|
||||||
? TextButton(
|
? TextButton(
|
||||||
|
style: TextButton.styleFrom(
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
_showLinkSpaceModelDialog(context);
|
_showLinkSpaceModelDialog(context);
|
||||||
},
|
},
|
||||||
@ -309,6 +315,7 @@ class CreateSpaceDialogState extends State<CreateSpaceDialog> {
|
|||||||
subspaces == null
|
subspaces == null
|
||||||
? TextButton(
|
? TextButton(
|
||||||
style: TextButton.styleFrom(
|
style: TextButton.styleFrom(
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
overlayColor: ColorsManager.transparentColor,
|
overlayColor: ColorsManager.transparentColor,
|
||||||
),
|
),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
|
Reference in New Issue
Block a user