0

the data fetch from api overrides the new edited text while entering done button from keyboard.

TextFormField(
controller: profileController.updateBusinessphoneController..text='${profileController.profileData[index].phoneNumber}',
 decoration: InputDecoration(
 border: OutlineInputBorder(),
 labelText: 'Business Phone',
 ),
),
kabanus
  • 24,623
  • 6
  • 41
  • 74
Hira Kauchha
  • 79
  • 1
  • 7

2 Answers2

0
TextFormField(
                    initialValue: '${profileController.profileData[index].phoneNumber}',
                    controller: profileController.updateBusinessphoneController,
                    decoration: InputDecoration(
                      border: OutlineInputBorder(),
                      labelText: 'Business Phone',
                    ),
                  ),
Aby Bermen
  • 162
  • 1
  • 6
0
TextFormField(
                initialValue: profileController.businessphoneNumber.value,
                onFieldSubmitted: (newValue){
                  profileController.businessphoneNumber.value=newValue;

                },
                decoration: InputDecoration(
                  border: OutlineInputBorder(),
                  labelText: 'Business Phone',
                ),
               
              ),
Hira Kauchha
  • 79
  • 1
  • 7