ueman / feedback

A simple widget for getting better feedback.
https://pub.dev/packages/feedback
400 stars 98 forks source link

Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null. #190

Closed marandaneto closed 2 years ago

marandaneto commented 2 years ago

Version

2.4.1

Library

feedback

Flutter channel

beta

Flutter version

2.12

Platform

Android

Details

Fails during compile time if you use the feedback library on the Beta channel.

https://github.com/getsentry/sentry-dart/runs/5597499002?check_suite_focus=true

../../../../../.pub-cache/hosted/pub.dartlang.org/feedback-2.4.1/lib/src/utilities/media_query_from_window.dart:77:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.

  • 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/opt/hostedtoolcache/flutter/packages/flutter/lib/src/widgets/binding.dart'). WidgetsBinding.instance!.removeObserver(this);

Steps to reproduce

Just compile it.

Output of flutter doctor -v

No response

marandaneto commented 2 years ago

Currently fixing that on the Sentry Flutter SDK as well, https://github.com/getsentry/sentry-dart/pull/786/files