flutter-examples
flutter-examples copied to clipboard
Runtime error syncfusion_flutter_datepicker: ^20.1.58
Hi, how can i resolve this? thanks!
/C:/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_datepicker-20.1.58/lib/src/date_picker/date_picker.dart(8059,31): error G7AD6136F: Method 'addPostFrameCallback' cannot be called on 'SchedulerBinding?' because it is potentially null.
This also shows up sometimes:
SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('/C:/Developer/flutter/packages/flutter/lib/src/scheduler/binding.dart'). Try calling using ?. instead. SchedulerBinding.instance.addPostFrameCallback((_) { ^^^^^^^^^^^^^^^^^^^^ /C:/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_datepicker-20.1.58/lib/src/date_picker/date_picker.dart:9826:31: Error: Method 'addPostFrameCallback' cannot be called on 'SchedulerBinding?' because it is potentially null.
'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('/C:/Developer/flutter/packages/flutter/lib/src/scheduler/binding.dart'). Try calling using ?. instead. SchedulerBinding.instance.addPostFrameCallback((_) { ^^^^^^^^^^^^^^^^^^^^
Hi,
Based on the shared information, we have checked the mentioned issue “Error occurred in the addPostFrameCallback method of the Flutter DateRangePicker”. We have checked the mentioned issue in 20.1.58 version and we are unable to reproduce the mentioned issue from our end. Also, can you please confirm if you are using the latest flutter version? Otherwise, kindly update to the latest flutter version and check still if you are facing same issue.
Regards, Indumathi R
Am also getting the same error
I have same proben when trying to use syncfusion_flutter_datepicker: ^20.1.58 in a flutterflow.io project, last version than did work for me in FlutterFlow was syncfusion_flutter_datepicker: ^19.4.56
Same problem
Try calling using ?. instead.
SchedulerBinding.instance.addPostFrameCallback((_) {
^^^^^^^^^^^^^^^^^^^^
/...AppData/Local/Pub/Cache/hosted/pub.dartlang.org/syncfusion_flutter_datepicker-20.1.59/lib/src/date_picker/date_picker.dart:9826:31: Error: Method 'addPostFrameCallback' cannot be called on 'SchedulerBinding?' because it is potentially null.
- 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('/C:/src/flutter/packages/flutter/lib/src/scheduler/binding.dart').
package:flutter/…/scheduler/binding.dart:1
Try calling using ?. instead.
SchedulerBinding.instance.addPostFrameCallback((_) {
^^^^^^^^^^^^^^^^^^^^
Failed to compile application.
This problem started after upgrade flutter to 3.x.
Downgrade did not helped even after flutter clean
syncfusion_flutter_datepicker: 20.1.47
That did work
Hi,
Thank you for the update. Please get in touch with us if would you require any further assistance.
Regards, Indumathi R