flutter-examples icon indicating copy to clipboard operation
flutter-examples copied to clipboard

Runtime error syncfusion_flutter_datepicker: ^20.1.58

Open cedric-caberto opened this issue 2 years ago • 6 comments

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((_) { ^^^^^^^^^^^^^^^^^^^^

cedric-caberto avatar Jun 02 '22 04:06 cedric-caberto

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

Indumathi1195R avatar Jun 03 '22 04:06 Indumathi1195R

Am also getting the same error

karanjarich avatar Jun 03 '22 12:06 karanjarich

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

PeterMX avatar Jun 04 '22 07:06 PeterMX

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

dmitrykurakin avatar Jun 07 '22 05:06 dmitrykurakin

syncfusion_flutter_datepicker: 20.1.47

That did work

LinMaris avatar Jul 06 '22 08:07 LinMaris

Hi,

Thank you for the update. Please get in touch with us if would you require any further assistance.

Regards, Indumathi R

Indumathi1195R avatar Aug 26 '22 05:08 Indumathi1195R