TinoGuo/pin_input_text_field

scrollPadding not available

Closed this issue ยท 8 comments

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?

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.
flutter/flutter#74566

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

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'

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?

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.

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

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

I will close it since the flutter team merged the fix