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

[bug]: optBool Error: NoSuchMethodError (NoSuchMethodError: Class 'bool' has no instance method 'toLowerCase'. #1124

Closed
rlee1990 opened this issue Sep 9, 2024 · 4 comments
Labels
Feedback Requested Waiting for new information from the OP

Comments

@rlee1990
Copy link

rlee1990 commented Sep 9, 2024

Describe the bug

When trying to get query param that is of type bool using optBool it throws an error.
NoSuchMethodError (NoSuchMethodError: Class 'bool' has no instance method 'toLowerCase'.
It appears that the issue is with _params[key]?.toLowerCase()

What operating system do you use?

macOS

Information about the installed tooling

No response

Steps to reproduce the issue

Try to get an optional bool query param.

Expected behavior

No response

Screenshots

No response

Additional Context

No response

@sebastianbuechler
Copy link
Contributor

Can you please describe what you are trying to do? Where do want to get an optional bool query parameter from? What are the proper steps to reproduce?

@rlee1990
Copy link
Author

@sebastianbuechler so I have query params that I am trying to retrieve. They are optional. So I am calling _routerService.topRoute.queryParams.optString('someName)
I then get the above error.

@FilledStacks
Copy link
Contributor

The type bool has no toLowerCase.

If you're expecting a string then you should first do a check on the value from _params[key] to see if it is String then extract the value and toLower it.

@FilledStacks FilledStacks added the Feedback Requested Waiting for new information from the OP label Oct 2, 2024
@rlee1990
Copy link
Author

rlee1990 commented Oct 2, 2024

I'm not the one trying to use to lowercase it's the stacked package once I comment out the line of code with the error the package works unless I clear cache or update the package and have to comment it out again

@rlee1990 rlee1990 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feedback Requested Waiting for new information from the OP
Projects
None yet
Development

No branches or pull requests

3 participants