Skyost / FlutterWeekView

Displays a highly customizable week view (or day view) which is able to display events, to be scrolled, to be zoomed-in & out and a lot more !
https://pub.dev/packages/flutter_week_view
MIT License
208 stars 89 forks source link

[FLUTTER 3] Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null. #91

Closed dJani97 closed 2 years ago

dJani97 commented 2 years ago

Describe the bug

When running the project, a couple of warnings like this are displayed:

../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/flutter_week_view-1.2.1+1/lib/src/widgets/week_view.dart:407:20: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
 - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/Apps/flutter/packages/flutter/lib/src/widgets/binding.dart').
    WidgetsBinding.instance
                   ^

In Flutter 3, WidgetsBinding.instance is no longer nullable, so the ?. operator is no longer necessary.

To Reproduce Reproducible by using Flutter 3 and flutter_week_view: ^1.2.1+1 in the same project.