Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TextField(
- onTap: (){
- if(AddNewController.to.textNameInputData.value != "") AddNewController.to.suffixNameVisibility.value = true;
- else AddNewController.to.suffixNameVisibility.value = false;
- },
- onSubmitted: (String str){
- AddNewController.to.suffixNameVisibility.value = false;
- textNameEditingController.clear();
- AddNewController.to.textNameInputData.value = str;
- },
- onChanged: (String str){
- AddNewController.to.textNameInputData.value = str;
- textNameEditingController = TextEditingController(text: str);
- if(str != "") AddNewController.to.suffixNameVisibility.value = true;
- else AddNewController.to.suffixNameVisibility.value = false;
- },
- minLines: 1,
- textCapitalization: TextCapitalization.sentences,
- style: TextStyle(fontSize: midFont, color: Color.fromARGB(255, 90, 90, 90),),
- cursorColor: Color.fromARGB(255, 90, 90, 90),
- controller: textNameEditingController,
- maxLines: 1,
- decoration: InputDecoration(
- suffixIcon: IconButton(
- onPressed: (){
- print("123");
- //textNameEditingController = null;
- textNameEditingController = TextEditingController(text: "");
- AddNewController.to.suffixNameVisibility.value = false;
- },//TextEditingController(text: '');},
- icon: Container(
- child: Visibility(
- visible: AddNewController.to.suffixNameVisibility.value,
- child: Icon(Icons.clear))),
- color: Colors.redAccent,
- ),
- hintText: "Введите имя",
- hintStyle: TextStyle(fontSize: midFont, color: Color.fromARGB(255, 105, 116, 127)),
- ),
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement