SHARE
TWEET

Untitled

a guest Jul 22nd, 2019 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top