torbenkeller / expandable_bottom_sheet

MIT License
33 stars 23 forks source link

Null safety related problem after the last update of flutter #25

Closed AmirhoseinSd closed 2 years ago

AmirhoseinSd commented 2 years ago

This happens when I run the app or when I want to use the expandable bottom sheet.

/C:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/expandable_bottom_sheet-1.1.1+1/lib/src/raw_expandable_bottom_sheet.dart:166:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
 - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/widgets/binding.dart').
    WidgetsBinding.instance!
                   ^
sandysultan commented 2 years ago

I got this fixed by changing WidgetsBindinginstance.instance! to WidgetsBindinginstance.instance in raw_expandable_bottom_sheet.dart line 160 and 166