Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash Error: Error: No named parameter with the name 'contextMenuBuilder'. #235

Open
weluid opened this issue Jul 15, 2024 · 5 comments
Open

Comments

@weluid
Copy link

weluid commented Jul 15, 2024

After updating Target SDK to 34 and sms_autofill to 2.4.0 i have this error during building

../../.pub-cache/hosted/pub.dev/sms_autofill-2.4.0/lib/sms_autofill.dart:126:7: Error: No named parameter with the name 'contextMenuBuilder'.
contextMenuBuilder: (context, editableTextState) {
^^^^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/pin_input_text_field-4.4.1/lib/src/widget/pin_widget.dart:70:3: Context: Found this candidate, but the arguments don't match.
PinInputTextField({
^^^^^^^^^^^^^^^^^
Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

  • Where:
    Script '/Users/mac/development/flutter/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy' line: 1350

  • What went wrong:
    Execution failed for task ':app:compileFlutterBuildDebug'.

Process 'command '/Users/mac/development/flutter/bin/flutter'' finished with non-zero exit value 1

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 32s
Exception: Gradle task assembleDebug failed with exit code 1

@CarlosPinheiro96
Copy link

Same!

After the target sdk update (34) this exact same error show up

@conanlovevit
Copy link

same for me

@conanlovevit
Copy link

@jaumard Pls support us with this issue

@pramodshresth
Copy link

@jaumard any solution?

@comancheo
Copy link

comancheo commented Aug 28, 2024

Cause: old version of flutter, so package PinInputTextField is resolved with version 4.4.1, but code of sms_aufotill is for 4.5.0+...
You can easily fork and remove
contextMenuBuilder: (context, editableTextState) { final List<ContextMenuButtonItem> buttonItems = editableTextState.contextMenuButtonItems; return AdaptiveTextSelectionToolbar.buttonItems( anchors: editableTextState.contextMenuAnchors, buttonItems: buttonItems, ); },

and just add
toolbarOptions: ToolbarOptions(paste: true),
in sms_autofill/lib/sms_autofill.dart:126 (version 2.4.0)

  Hope author will resolve this in close future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants