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

rror: Method 'insert' cannot be called on 'OverlayState?' because it is potentially null. - 'OverlayState' #3

Open
sureshdeva1 opened this issue May 29, 2023 · 0 comments

Comments

@sureshdeva1
Copy link

Hi while i am trying to run your code i am getting the following error.

../Flutter/flutter_windows_3.3.10-stable/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-5.0.8/lib/src/widgets/overlay_custom_widget.dart:99:25: Error: Method 'insert' cannot be called on 'OverlayState?' because it is potentially null.

  • 'OverlayState' is from 'package:flutter/src/widgets/overlay.dart' ('../Flutter/flutter_windows_3.3.10-stable/flutter/packages/flutter/lib/src/widgets/overlay.dart').
    Try calling using ?. instead.
    Overlay.of(context).insert(entry);
    ^^^^^^
    ../Flutter/flutter_windows_3.3.10-stable/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-5.0.8/lib/src/widgets/app_text_field.dart:65:9: Error: Type 'EditableTextContextMenuBuilder' not found.
    final EditableTextContextMenuBuilder? contextMenuBuilder;
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ../Flutter/flutter_windows_3.3.10-stable/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-5.0.8/lib/src/widgets/app_text_field.dart:65:9: Error: 'EditableTextContextMenuBuilder' isn't a type.
    final EditableTextContextMenuBuilder? contextMenuBuilder;
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ../Flutter/flutter_windows_3.3.10-stable/flutter/.pub-cache/hosted/pub.dartlang.org/nb_utils-5.0.8/lib/src/widgets/app_text_field.dart:353:7: Error: No named parameter with the name 'contextMenuBuilder'.
    contextMenuBuilder: widget.contextMenuBuilder,
    ^^^^^^^^^^^^^^^^^^
    ../Flutter/flutter_windows_3.3.10-stable/flutter/packages/flutter/lib/src/material/text_form_field.dart:97:3: Context: Found this candidate, but the arguments don't match.
    TextFormField({
    ^^^^^^^^^^^^^

FAILURE: Build failed with an exception.

Thanks,
Suresh.

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

1 participant