TinoGuo / pin_input_text_field

A textField widget to help display different style pin
Apache License 2.0
384 stars 83 forks source link

scrollPadding not available #63

Closed rahuldange09 closed 3 years ago

rahuldange09 commented 3 years ago

Hi, scrollPadding is not available with PinInputTextField() As the OTP field is hiding behind a keyboard when using SingleChildScrollView. Can you please add support for it?

TinoGuo commented 3 years ago

it's flutter issue, when you set the maxLength: n and showCursor: false together in TextField, you would not be able to scroll automatically when keyboard display. https://github.com/flutter/flutter/issues/74566

rahuldange09 commented 3 years ago

Oh, I see. I guess it's more of showCursor: false problem. When we hide the cursor this is happening. Well until the flutter team gives a solution or fixes it. Can we just make cursorWidth:0 and cursorHeight:0 or cursorColor: Colors.transparent instead of showCursor: false? As it will hide it only and will also solve that problem. I can create a PR if you want

TinoGuo commented 3 years ago

Yes, we can, but one gentle reminder: we need to verify the behaviour in both iOS and Android platforms, coz we have issue at first with transparent empty cursor in one of the platform. Then we switched to 'cursor:false'

rahuldange09 commented 3 years ago

Ohh, Can you tell me what issue you were facing so we can check it once again, or can go with cursorWidth:0 and cursorHeight:0?

TinoGuo commented 3 years ago

it would crash when we set cursorWidth: 0. but it's a long time ago, I can't remember exactly and not sure whether it's fixed by flutter team.

rahuldange09 commented 3 years ago

I don't see any crash though. Will create a PR so you can also test the same.

TinoGuo commented 3 years ago

the flutter team is working on fixing. I doubt we should fix it

TinoGuo commented 3 years ago

I will close it since the flutter team merged the fix