diegoveloper / flutter_percent_indicator

Flutter percent indicator library
BSD 2-Clause "Simplified" License
679 stars 206 forks source link

Build failed on Flutter 2.10. #160

Closed masahiro-ikemoto closed 2 years ago

masahiro-ikemoto commented 2 years ago

The version 4.2.0 was faild to build on Flutter 2.10 (or earlier).

ERROR: .pub-cache/hosted/pub.dartlang.org/percent_indicator-4.2.0/lib/linear_percent_indicator.dart:162:29: Error: Method 'addPostFrameCallback' cannot be called on 'WidgetsBinding?' because it is potentially null.
ERROR:  - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../development/flutter/packages/flutter/lib/src/widgets/binding.dart').
ERROR: Try calling using ?. instead.
ERROR:     WidgetsBinding.instance.addPostFrameCallback((_) {

I think to fix it with which one of below:

diegoveloper commented 2 years ago

Use the previous version of this package

masahiro-ikemoto commented 2 years ago

Use the previous version of this package

Even if that, I think you sould set lowe limit of fluttter version to let to lock previous version on 2.10.

diegoveloper commented 2 years ago

That's a good idea. Would you mind to send a PR?

Thank you

On Thu, May 12, 2022, 9:22 PM IKEMOTO, Masahiro @.***> wrote:

Use the previous version of this package

Even if that, I think you sould set lowe limit of fluttter version to let to lock previous version on 2.10.

— Reply to this email directly, view it on GitHub https://github.com/diegoveloper/flutter_percent_indicator/issues/160#issuecomment-1125593140, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFL3UA2QPGWBNA4LIFID3DVJW4HZANCNFSM5VZ7XRMQ . You are receiving this because you modified the open/close state.Message ID: @.*** com>