peng8350 / flutter_pulltorefresh

a widget provided to the flutter scroll component drop-down refresh and pull up load.
MIT License
2.71k stars 722 forks source link

Warnings found when building the app and Flutter upgraded to 3.0 #599

Open Ahmad-Hamwi opened 2 years ago

Ahmad-Hamwi commented 2 years ago

These warning shows in red when building the app And shows in grey when using the --verbose flag:

[ +903 ms] ../../Library/Flutter/.pub-cache/hosted/pub.dartlang.org/pull_to_refresh-2.0.0/lib/src/smart_refresher.dart:513:22: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
[        ]  - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Library/Flutter/packages/flutter/lib/src/widgets/binding.dart').
[        ]       WidgetsBinding.instance!.addPostFrameCallback((_) {
[        ]                      ^
[        ] ../../Library/Flutter/.pub-cache/hosted/pub.dartlang.org/pull_to_refresh-2.0.0/lib/src/smart_refresher.dart:765:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
[        ]  - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Library/Flutter/packages/flutter/lib/src/widgets/binding.dart').
[        ]     WidgetsBinding.instance!.addPostFrameCallback((_) {
[        ]                    ^
[        ] ../../Library/Flutter/.pub-cache/hosted/pub.dartlang.org/pull_to_refresh-2.0.0/lib/src/smart_refresher.dart:788:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
[        ]  - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Library/Flutter/packages/flutter/lib/src/widgets/binding.dart').
[        ]     WidgetsBinding.instance!.addPostFrameCallback((_) {
[        ]                    ^
[        ] ../../Library/Flutter/.pub-cache/hosted/pub.dartlang.org/pull_to_refresh-2.0.0/lib/src/smart_refresher.dart:796:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
[        ]  - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Library/Flutter/packages/flutter/lib/src/widgets/binding.dart').
[        ]     WidgetsBinding.instance!.addPostFrameCallback((_) {
[        ]                    ^
[        ] ../../Library/Flutter/.pub-cache/hosted/pub.dartlang.org/pull_to_refresh-2.0.0/lib/src/smart_refresher.dart:803:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
[        ]  - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Library/Flutter/packages/flutter/lib/src/widgets/binding.dart').
[        ]     WidgetsBinding.instance!.addPostFrameCallback((_) {
[        ]                    ^
[  +23 ms] ../../Library/Flutter/.pub-cache/hosted/pub.dartlang.org/pull_to_refresh-2.0.0/lib/src/internals/indicator_wrap.dart:260:24: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
[        ]  - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Library/Flutter/packages/flutter/lib/src/widgets/binding.dart').
[        ]         WidgetsBinding.instance!.addPostFrameCallback((_) {
[        ]                        ^
[        ] ../../Library/Flutter/.pub-cache/hosted/pub.dartlang.org/pull_to_refresh-2.0.0/lib/src/internals/indicator_wrap.dart:290:22: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
[        ]  - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Library/Flutter/packages/flutter/lib/src/widgets/binding.dart').
[        ]       WidgetsBinding.instance!.addPostFrameCallback((_) {
[        ]                      ^
[        ] ../../Library/Flutter/.pub-cache/hosted/pub.dartlang.org/pull_to_refresh-2.0.0/lib/src/internals/indicator_wrap.dart:393:22: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
[   +1 ms]  - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Library/Flutter/packages/flutter/lib/src/widgets/binding.dart').
[        ]       WidgetsBinding.instance!.addPostFrameCallback((_) {
[        ]                      ^
coscx commented 2 years ago

pub search pull_to_refresh_flutter3

Ahmad-Hamwi commented 2 years ago

Wait why there's a new package for that?

cesairekent commented 2 years ago

same issue for me

MazenCoder commented 2 years ago

same issue

Clon1998 commented 2 years ago

try: pull_to_refresh_flutter3: ^2.0.1

ianvillamia commented 2 years ago

really? a new package? 😆

robertoltrocha commented 2 years ago

Hi, why not update the package and not create a new package?

nal-khangpt commented 2 years ago

Hi, why not update the package and not create a new packageI

I think there's no one merge this PR 😄