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

compiler problems #12

Closed
jmls opened this issue Mar 10, 2021 · 5 comments
Closed

compiler problems #12

jmls opened this issue Mar 10, 2021 · 5 comments

Comments

@jmls
Copy link

jmls commented Mar 10, 2021

I'm both a flutter and binder newbie, so please go easy if this is a stupid question ;)

I'm playing around with the examples , and I'm just wondering how to make this warning go away ..

image

the code in question is

image

as you can see, the "watch" is underlined in blue

There are also several deprecated notices - once I get the examples running I can try and get those fixed and submit a PR if that's useful ?

@letsar
Copy link
Owner

letsar commented Mar 10, 2021

Hi,

There are no stupid questions, we are all learning something new every day 😉.

I also had this annoying issue, which have already been reported here.
For the moment you can add this rule in the analysis_options.yaml (see this example for the whole file example):

top_level_function_literal_block: ignore

Which deprecating notice do you refer to?

@jmls
Copy link
Author

jmls commented Mar 10, 2021

Thanks 😊 the deprecation messages are for raised button and flatbutton, replaced with elevated button and text button

@letsar
Copy link
Owner

letsar commented Mar 10, 2021

Ah yes, I need to replace them 👍

@erf
Copy link

erf commented Mar 10, 2021

@jmls

To remove the warning you need to add the generic type to Computed, in your case bool, because as the warning says, it can't be infered.

Example:

final something = Computed<bool>((watch) {
  return true;
});
´``

@jmls
Copy link
Author

jmls commented Mar 11, 2021

@erf, yup that worked for me ;) thanks

@letsar letsar closed this as completed Mar 28, 2021
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

3 participants