6

2 I/TextInputPlugin( 8390): Composing region changed by the framework. Restarting the input method. This happens when I click submit on my textformfield or my button. I have restarted my IDE, still shows the same message. I can't submit my form.

This is the code for the textformfield widget

                         TextFormField(
                            decoration: InputDecoration(
                              
                              hintStyle: const TextStyle(
                                letterSpacing: 2,
                                color: Colors.white,
                                fontWeight: FontWeight.bold,
                              ),
                              fillColor:
                                  Theme.of(context).scaffoldBackgroundColor,
                              filled: true,
                              border: OutlineInputBorder(
                                borderRadius: BorderRadius.circular(10.0),
                                borderSide: BorderSide.none,
                              ),
                            ),
                            
                            textInputAction: TextInputAction.done,
                            keyboardType: TextInputType.text,
                            focusNode: _aboutFocusNode,
                            controller: _aboutController,

                            validator: (val) {
                              if (val!.length < 6) {
                                return 'Should be at least 6 characters';
                              }
                              if (val.isEmpty) {
                                return 'Its empty';
                              }
                              return '';
                            },
                            onSaved: (value) {
                              
                              _editUser = UserItem(
                                  name: _editUser.name,
                                  number: _editUser.number,
                                  about: value);
                            },
                            onFieldSubmitted: (_) {
                              _saveForm();
                            }, 
                          ),

this is the raisedbutton snapshot

                Column(
                  mainAxisAlignment: MainAxisAlignment.end,
                  children: [
                    Container(
                      height: 55,
                      width: double.infinity,
                      child: RaisedButton(
                        onPressed: _saveForm,
                        color: kPrimaryColor,
                        child: const Center(
                          child: Text(
                            'Update',
                            style: TextStyle(
                              fontSize: 23,
                              color: Colors.white,
                            ),
                          ),
                        ),
                      ),
                    ),
                  ],
                ),

This is the code of the function saveForm

  Future<void> _saveForm() async {
final isValid = _formKey.currentState!.validate();
if (!isValid) {
  return;
}
_formKey.currentState!.save();

setState(() {
  _isLoading = true;
});

await Provider.of<UserProvider>(context, listen: false)
    .updateUser(_editUser);


setState(() {
  _isLoading = false;
});

Navigator.of(context).pop();

}

Isaac Eze
  • 61
  • 2

0 Answers0