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

无法编译通过 #3

Open
tang5011235 opened this issue Jun 6, 2022 · 1 comment
Open

无法编译通过 #3

tang5011235 opened this issue Jun 6, 2022 · 1 comment

Comments

@tang5011235
Copy link

Flutter (Channel unknown, 2.10.4, on Microsoft Windows [Version 10.0.22000.708], locale en-US)

报错

/C:/Users/tang5/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/sticky_and_expandable_list-1.1.0/lib/src/expandable_section_container.dart:170:31: Error: Method 'addPostFrameCallback' cannot be called on 'WidgetsBinding?' because it is potentially null.

  • 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/D:/soft/work/flutter/packages/flutter/lib/src/widgets/binding.dart').
    Try calling using ?. instead.
    WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
    ^^^^^^^^^^^^^^^^^^^^
    /C:/Users/tang5/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/sticky_and_expandable_list-1.1.0/lib/src/sliver_expandable_list.dart:414:31: Error: Method 'addPostFrameCallback' cannot be called on 'WidgetsBinding?' because it is potentially null.
  • 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/D:/soft/work/flutter/packages/flutter/lib/src/widgets/binding.dart').
    Try calling using ?. instead.
    WidgetsBinding.instance.addPostFrameCallback((_) {
    ^^^^^^^^^^^^^^^^^^^^

FAILURE: Build failed with an exception.

@AIYO77
Copy link
Owner

AIYO77 commented Jun 6, 2022

Flutter (Channel unknown, 2.10.4, on Microsoft Windows [Version 10.0.22000.708], locale en-US)

报错

/C:/Users/tang5/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/sticky_and_expandable_list-1.1.0/lib/src/expandable_section_container.dart:170:31: Error: Method 'addPostFrameCallback' cannot be called on 'WidgetsBinding?' because it is potentially null.

  • 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/D:/soft/work/flutter/packages/flutter/lib/src/widgets/binding.dart').
    Try calling using ?. instead.
    WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
    ^^^^^^^^^^^^^^^^^^^^
    /C:/Users/tang5/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/sticky_and_expandable_list-1.1.0/lib/src/sliver_expandable_list.dart:414:31: Error: Method 'addPostFrameCallback' cannot be called on 'WidgetsBinding?' because it is potentially null.
  • 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/D:/soft/work/flutter/packages/flutter/lib/src/widgets/binding.dart').
    Try calling using ?. instead.
    WidgetsBinding.instance.addPostFrameCallback((_) {
    ^^^^^^^^^^^^^^^^^^^^

FAILURE: Build failed with an exception.

Channel unknown ??

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

No branches or pull requests

2 participants