Welcome to the Flutter feedback portal. We’re happy you’re here! If you have feedback on how to improve the Flutter, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

Hello.


I'm excited about starting to use the new drag drop support added to the calendar.

However I'm getting stuck pretty much at the beginning. I'm getting the error below.

I'm using my own Appointment class because I need the additional details such as the color that should be displayed for it, etc.

When I set  allowDragDrop to true it seems that the calendar is expecting an instance of the appointment class defined in the calendar package.

Can you suggest a way forward?


Error:


The following TypeErrorImpl was thrown while handling a gesture:

Expected a value of type 'Appointment' (in package:edent/modules/calendar/model/appointment.dart),

package:edent/…/model/appointment.dart:1

but got one of type 'Appointment' (in

package:syncfusion_flutter_calendar/src/calendar/appointment_engine/appointment.dart)

package:syncfusion_flutter_calendar/…/appointment_engine/appointment.dart:1

When the exception was thrown, this was the stack:

C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 251:49 throw_

C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 84:3 castError

C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 452:10 cast

C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/classes.dart 635:14 as_C

C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/js_array.dart 72:14 add]

packages/syncfusion_flutter_calendar/src/calendar/views/calendar_view.dart 2258:21 [_handleLongPressEnd]

packages/syncfusion_flutter_calendar/src/calendar/views/calendar_view.dart 4892:7 [_onHorizontalEnd]

packages/syncfusion_flutter_calendar/src/calendar/views/calendar_view.dart 576:15

packages/flutter/src/gestures/monodrag.dart 485:41

packages/flutter/src/gestures/recognizer.dart 198:24 invokeCallback

packages/flutter/src/gestures/monodrag.dart 485:5 [_checkEnd]