Error: Method 'addPostFrameCallback' cannot be called on 'WidgetsBinding?' because it is potentially null.
thearithchhie opened this issue · 3 comments
thearithchhie commented
../../../../../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_calendar_carousel-2.3.0/lib/flutter_calendar_carousel.dart:950:33: Error: Method 'addPostFrameCallback' cannot be called on 'WidgetsBinding?' because it is potentially null.
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../../../../flutter/packages/flutter/lib/src/widgets/binding.dart').
Try calling using ?. instead.
WidgetsBinding.instance.addPostFrameCallback((_) {
hyochan commented
I think #313 patch will work which is published in version 3.2.1
.
Please try this and come back.