Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. _addContact(){
  2. Contact contact = new Contact();
  3. buildShowRoundedModalBottomSheet(
  4. context,
  5. 'Add contact',
  6. editContact(contact),
  7. 'contact',
  8. () => _updateContactList(contact)
  9. );
  10. }
  11.  
  12. editContact(Contact contact){
  13. return Padding(
  14. padding: const EdgeInsets.only(top: 12.0),
  15. child: Column(
  16. children: <Widget>[
  17. Row(
  18. mainAxisAlignment: MainAxisAlignment.center,
  19. children: <Widget>[
  20. SizedBox(
  21. width: MediaQuery.of(context).size.width * 0.9,
  22. child: TextField(
  23. controller: contact._contactRelationController,
  24. decoration: InputDecoration(
  25. hintText: contact._contactRelationController.text,
  26. ),
  27. ),
  28. ),
  29. ],
  30. ),
  31. ]
  32. )
  33. )
  34. }```
  35. I thought that the controller of a textfield would be updated everytime its text property changes but its seems that it's not the case
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement