Paste option not working in textfield after clicking done in keyboard in flutter

Viewed 250

I am working on a flutter project and I am using a textfield and I am getting a weird issue in iOS only.

This is my code

Widget build(BuildContext context) {
return SafeArea(
  child: Container(
    margin: EdgeInsets.only(left: 20, right: 20),
    child: TextField(
      onChanged: (value) => {
        //code here
      },
      controller: controller,
      style: TextStyle(
        fontSize: 32,
        fontWeight: FontWeight.w500,
      ),
      keyboardType: TextInputType.url,
      autocorrect: false,
      decoration: InputDecoration(
        hintText: 'Paste URL...',
        border: InputBorder.none,
        contentPadding: EdgeInsets.only(top: 0),
      ),
    ),
  ),
);

}

So when I try to paste any text in the textfield by long press the paste option is shown the first time. But if I click on the keyboard done(on pressing done button keyboard gets hidden) button the paste option is not shown no matter how long I press. But if I type any character then the paste option comes again. I am not sure what I am doing wrong. Any suggestions would be helpful.

Flutter version - 2.10.3

0 Answers
Related