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

The name 'SuggestionsBoxDecoration' isn't a class. Try correcting the name to match an existing class. #459

Closed
felipecastrosales opened this issue Feb 17, 2023 · 20 comments

Comments

@felipecastrosales
Copy link
Contributor

felipecastrosales commented Feb 17, 2023

Hi,

In the last hour (coincidentally after the release of the new version) I get this error.

The name 'SuggestionsBoxDecoration' isn't a class. Try correcting the name to match an existing class.

It didn't appear before.

I've run the command below in the terminal and it didn't work.

flutter clean && flutter pub cache repair && flutter pub get.

Any suggestions here?

@felipecastrosales
Copy link
Contributor Author

felipecastrosales commented Feb 17, 2023

Update.

In this way:
flutter_typeahead: 4.3.3

Works as expected.

But I think for the above case, we need to check.

@sjmcdowall
Copy link
Collaborator

Well that's a bit odd -- is your flutter up to date? The last change dealt with more examples in the examples side, etc. from what I could -- and it passed the (rather limited granted) test suite .. hmmm

@felipecastrosales
Copy link
Contributor Author

I'm in Flutter 3.7.3, @sjmcdowall.

My tests also broke.

@ivofernandes
Copy link
Contributor

Oh maybe it needs to be exported too, I will try to fix it

@sjmcdowall
Copy link
Collaborator

Well something odd is happening -- many use 3.7.3 (I think) w/o issues .. are you guys on some beta branch ?? I.e. non-stable?

ivofernandes added a commit to ivofernandes/flutter_typeahead that referenced this issue Feb 17, 2023
@ivofernandes
Copy link
Contributor

Check here, I guess now everything is visible, maybe the example should also use that decoration on the list?

#460

@felipecastrosales
Copy link
Contributor Author

@ivofernandes I performed a test with your branch and it solved the problem I had in the tests.

@sjmcdowall, could you confirm with us?

@ivofernandes
Copy link
Contributor

Then probably was a problem with the visibility of this classes.

The example is not really using that decoration classes in the suggestion box

Can you double check if this visibility makes sense?

Screenshot 2023-02-17 at 19 19 33

@felipecastrosales
Copy link
Contributor Author

@ivofernandes for me yes.

When I'm creating barrel files, I like to use this extension.

@luis901101
Copy link

Definitely a problem of class not being exported, this will require new version release

@ivofernandes
Copy link
Contributor

The PR is ready

#460

sjmcdowall added a commit that referenced this issue Feb 18, 2023
#459 returned visibility to classes that are not in the example
@sjmcdowall
Copy link
Collaborator

Should be fixed in 4.3.5

@znromonk
Copy link

Not sure if I should open another issue, but CupertinoSuggestionsBoxDecoration is having the same issue. I can get around the issue by manually adding it to my source file as below

import 'package:flutter_typeahead/src/cupertino/suggestions_box/cupertino_suggestions_box_decoration.dart';

It does introduce a dart linter warning:

Import of a library in the 'lib/src' directory of another package.
Try importing a public library that exports this library, or removing the import.

@sjmcdowall
Copy link
Collaborator

Well that doesn't sound good .. ugh. @ivofernandes ??

@sjmcdowall sjmcdowall reopened this Feb 18, 2023
@ivofernandes
Copy link
Contributor

I can add it too, and will add it to the example file and fix the format to get the package to 140 points

@ivofernandes
Copy link
Contributor

Now all the files are being exported

Screenshot 2023-02-18 at 20 43 41

@ivofernandes
Copy link
Contributor

It's here
#461

@ivofernandes
Copy link
Contributor

Everything is fine? :) This probably can be closed now?

@znromonk
Copy link

@ivofernandes
I added the master branch as dependency and it works. Thank you.

@felipecastrosales
Copy link
Contributor Author

Perfect! I will close this issue.
Thanks for the quick response, @ivofernandes.

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