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

Update auto_close_behavior.dart #339

Merged
merged 1 commit into from
May 15, 2022
Merged

Update auto_close_behavior.dart #339

merged 1 commit into from
May 15, 2022

Conversation

bct-fbo
Copy link
Contributor

@bct-fbo bct-fbo commented May 13, 2022

Fixed error message: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.

Fixed error message: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
@bct-fbo bct-fbo mentioned this pull request May 13, 2022
@fennelhans
Copy link

This is how other teams are solving it: (WidgetsBinding.instance as WidgetsBinding).addObserver(this);

@wujek-srujek
Copy link

@fennelhans Can you explain why anybody would do it like this?

@fennelhans
Copy link

@fennelhans Can you explain why anybody would do it like this?

To support Flutter 2

@wujek-srujek
Copy link

Oh yeah, you are right, this would work. But in the case of my own code it would just trigger https://dart-lang.github.io/linter/lints/cast_nullable_to_non_nullable.html, that's why I didn't even think of it. Thanks.

@letsar letsar merged commit 7c126c4 into letsar:master May 15, 2022
@bct-fbo bct-fbo deleted the flutter-3.0-update branch May 16, 2022 06:49
@fennelhans
Copy link

fennelhans commented Oct 11, 2022 via email

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.

4 participants