google / charts

https://pub.dev/packages/charts_flutter
Apache License 2.0
2.81k stars 1.2k forks source link

[WEB] Could not compile with Flutter 3.0.0 #764

Open bambinoua opened 2 years ago

bambinoua commented 2 years ago

At compilation process I see this message:

Warning: Operand of null-aware operation '!' has type 'SchedullerBinding' which excludes null.

SchedullerBinding.instance!.addPostFrameCallback(...)
                          ^
                          |---- Since flutter 3.0.0 instance does not nullable.
federico2390 commented 2 years ago

Go to the relative file and remove the "!"

andreclinio commented 2 years ago

Any perspective from the authors about a patch release?

federico2390 commented 2 years ago

I dont know but for now, this is a solution

bambinoua commented 2 years ago

Go to the relative file and remove the "!"

Do you suggest to do this any time after update/upgrade packages?

P.S. I think the best solution is to clone repository and make a fix. Will wait for some anyway.

viralkachhadiya commented 2 years ago

@stuartmorgan can you look below pr?

stuartmorgan commented 2 years ago

@stuartmorgan can you look below pr?

Please see https://github.com/google/charts#development. I can look into the possibility of re-syncing changes though.

However, I'm not sure why the title of this issue is "could not compile" given that this is just a warning.

bambinoua commented 2 years ago

However, I'm not sure why the title of this issue is "could not compile" given that this is just a warning.

Yes, you are right now it is a warning but when I wrote this message I have at least 3 packages with the same issue and web app was not compiled (it was stopped) so I notified all authors of problem packages.

Some packages were fixed so no this package just print warning so I think this issue can be closed.

bambinoua commented 2 years ago

No.. I think it will better to close it after this issue was fixed really. Sorry ;)

viralkachhadiya commented 2 years ago

@bambinoua can you please review or merge above pr?

mathiuleo commented 2 years ago

For me, I can clone the repository and modify the code. But what I want is to respect the author's license, so I won't clone or copy code into our project :)

purgeyao commented 2 years ago

@bambinoua Anyway, there's a warning that needs to be tuned out. What are your plans

trojancode commented 1 year ago

Use this package. https://pub.dev/packages/charts_flutter_new

It's a fixed version of charts_flutter