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

Fix WidgetsBinding potentially null #15

Closed
wants to merge 1 commit into from

Conversation

danoetz
Copy link

@danoetz danoetz commented Sep 13, 2022

Fix this issue:
.pub-cache/hosted/pub.dartlang.org/scroll_date_picker-3.6.0/lib/src/scroll_date_picker.dart:120:31: Error: Method 'addPostFrameCallback' cannot be called on 'WidgetsBinding?' because it is potentially null.

Type of change

Please select PR type by entering x between [ ].

  • Bugfix
  • Feature
  • Refactoring
  • Documentation content changes



Description

I got error when add this package.
.pub-cache/hosted/pub.dartlang.org/scroll_date_picker-3.6.0/lib/src/scroll_date_picker.dart:120:31: Error: Method 'addPostFrameCallback' cannot be called on 'WidgetsBinding?' because it is potentially null.

Changes:
WidgetsBinding.instance.addPostFrameCallback ~> WidgetsBinding.instance?.addPostFrameCallback

Fix this issue:
'''.pub-cache/hosted/pub.dartlang.org/scroll_date_picker-3.6.0/lib/src/scroll_date_picker.dart:120:31: Error: Method 'addPostFrameCallback' cannot be called on 'WidgetsBinding?' because it is potentially null.'''
@mincheol-shin
Copy link
Owner

mincheol-shin commented Sep 29, 2022

It is expected to be resolved by using version 3.5.0 or lower, or by upgrading the Flutter SDK.

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

Successfully merging this pull request may close these issues.

2 participants