jaumard / sms_autofill

Flutter plugin to provide SMS code autofill support
MIT License
281 stars 173 forks source link

Copy paste is not working on 2.3.0 - UI breaks on long press #220

Closed MSarmadQadeer closed 3 weeks ago

MSarmadQadeer commented 4 months ago

What is this happening on long press? UI is breaking and no option for pasting the copied code.

WhatsApp Image 2024-02-05 at 1 23 38 PM

PinFieldAutoFill(
  decoration: BoxLooseDecoration(
    strokeColorBuilder: PinListenColorBuilder(
        Theme.of(context).colorScheme.onBackground,
        Theme.of(context).colorScheme.primary),
    bgColorBuilder: const FixedColorBuilder(Colors.transparent),
    strokeWidth: 1,
  ),
  autoFocus: true,
  cursor: Cursor(
    color: Theme.of(context).colorScheme.primary,
    enabled: true,
    width: 1,
  ),
  currentCode: codeValue,
  onCodeSubmitted: _submitOtp,
  codeLength: 6,
  onCodeChanged: (code) {
    codeValue = code.toString();
    if (code?.length == 6) {
      _submitOtp(code);
    }
    if (kDebugMode) {
      print("onCodeChanged $code");
    }
    setState(() {
      codeValue = code.toString();
    });
  },
)
AngeloAvv commented 1 month ago

Same problem here!

jaumard commented 3 weeks ago

should be ok on master, will do a release later