google / charts

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

Fix warnings for Flutter 3.0 - `Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.` #765

Closed fzyzcjy closed 1 year ago

fzyzcjy commented 2 years ago

Detailed warnings:

    ../../../../.pub-cache/git/charts-30477090290b348ed3101bc13017aae465f59017/charts_flutter/lib/src/chart_container.dart:249:27: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
     - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('../../../../fvm/versions/3.0.0/packages/flutter/lib/src/scheduler/binding.dart').
        if (!SchedulerBinding.instance!.hasScheduledFrame) {
                              ^
    ../../../../.pub-cache/git/charts-30477090290b348ed3101bc13017aae465f59017/charts_flutter/lib/src/chart_container.dart:250:24: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
     - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('../../../../fvm/versions/3.0.0/packages/flutter/lib/src/scheduler/binding.dart').
          SchedulerBinding.instance!.scheduleFrame();
                           ^
    ../../../../.pub-cache/git/charts-30477090290b348ed3101bc13017aae465f59017/charts_flutter/lib/src/chart_container.dart:253:22: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
     - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('../../../../fvm/versions/3.0.0/packages/flutter/lib/src/scheduler/binding.dart').
        SchedulerBinding.instance!.addPostFrameCallback(startAnimationController);
                         ^
    ../../../../.pub-cache/git/charts-30477090290b348ed3101bc13017aae465f59017/charts_flutter/lib/src/chart_container.dart:276:22: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
     - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('../../../../fvm/versions/3.0.0/packages/flutter/lib/src/scheduler/binding.dart').
        SchedulerBinding.instance!.addPostFrameCallback(doRebuild);

fix #771

viralkachhadiya commented 2 years ago

@fzyzcjy one more file need to be fix https://github.com/google/charts/blob/master/charts_flutter/example/lib/behaviors/slider.dart line no.122

fzyzcjy commented 2 years ago

done

viralkachhadiya commented 2 years ago

must be specify limit new flutter version 3.0.0 in pubspec.yml otherwise those who are not using latest version of 3.0.0, they all are getting error. #764

fzyzcjy commented 2 years ago

done

viralkachhadiya commented 2 years ago

@rickcasson can you close this pr? Bcz @fzyzcjy might be not available and assign me .

fzyzcjy commented 2 years ago

Oh I forgot it. Let me update it.

fzyzcjy commented 2 years ago

done

ilovelinux commented 2 years ago

Fix #771

fzyzcjy commented 2 years ago

Any updates...?

lohanbodevan commented 2 years ago

Hey @rickcasson, any idea when it would be released? Thanks ;)

rickcasson commented 2 years ago

@lohanbodevan @fzyzcjy, sorry, no idea. I'm not a maintainer of this repo, and based on the readme, it doesn't sound like they are accepting external contributions anyway...

blong-sofi commented 2 years ago

@google-admin , @google-ospo-team , gentle bump

google-admin commented 2 years ago

@google/google-charts-admins can maybe help

marceloamp2 commented 2 years ago

Same issue

a15056478 commented 2 years ago

Did anyone find any other solution for this? @google-admin

gfb-47 commented 2 years ago

Would be nice if this got approved

tushar0518 commented 2 years ago

@nshahan can you please look into it? Thank you.

jatinArhamLabs commented 2 years ago

@rickcasson when this branch gets merged

DanOxlade commented 1 year ago

+1 for this, this is the last package my app needs to be updated for Flutter 3+

ilovelinux commented 1 year ago

@DanOxlade you can already upgrade to Flutter 3+. The library does its job, the only annoying thing is a little warning (not error, see PR description) you will get every time you will build an app.

gfb-47 commented 1 year ago

pr is fine, what is the issue?

stuartmorgan commented 1 year ago

This project is no longer maintained, and cannot accept any PRs. Community members interested in collaborating on a community-maintained fork can coordinate in this issue.