syncfusion / flutter-widgets

Syncfusion Flutter widgets libraries include high quality UI widgets and file-format packages to help you create rich, high-quality applications for iOS, Android, and web from a single code base.
1.46k stars 680 forks source link

'Null' is not a subtype of type 'RenderBehaviorArea' in type cast #1742

Closed barilki closed 5 days ago

barilki commented 2 months ago

Version: 25.1.35 SfCartesianChart and CandleSeries. When i try to scroll i get the following error:

======== Exception caught by gesture library =======================================================
The following _TypeError was thrown while dispatching a pointer event:
type 'Null' is not a subtype of type 'RenderBehaviorArea' in type cast

When the exception was thrown, this was the stack: 
#0      ZoomPanBehavior._performPinchZoomUpdate (package:syncfusion_flutter_charts/src/charts/behaviors/zooming.dart:445:49)
#1      ZoomPanBehavior.handleEvent (package:syncfusion_flutter_charts/src/charts/behaviors/zooming.dart:367:7)
#2      RenderBehaviorArea.handleEvent (package:syncfusion_flutter_charts/src/charts/interactions/behavior.dart:391:22)
#3      RenderChartArea.handleEvent (package:syncfusion_flutter_charts/src/charts/base.dart:402:22)
#4      GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:475:22)
#5      RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:430:11)
#6      GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:420:7)
#7      GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:383:5)
#8      GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:330:7)
#9      GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:299:9)
#10     _invoke1 (dart:ui/hooks.dart:328:13)
#11     PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:429:7)
#12     _dispatchPointerDataPacket (dart:ui/hooks.dart:262:31)
Event: PointerMoveEvent#b2a53(position: Offset(131.3, 385.1))
  position: Offset(131.3, 385.1)
Target: RenderCartesianChartArea#44377 DISPOSED
  needs compositing
  parentData: offset=Offset(0.0, 0.0) (can use size)
  constraints: BoxConstraints(0.0<=w<=342.7, 0.0<=h<=153.7)
  size: Size(342.7, 153.7)
PreethikaSelvam commented 2 months ago

Hi @barilki,

We can replicate the reported issue at our end. This issue is scheduled to be fixed in upcoming release, which is expected to be rolled out by April 4, 2024. We will update you here once the release is rolled out and we appreciate your patience until then.

Regards,

Preethika Selvam.

LokeshPalani commented 1 month ago

Hi @barilki,

We would like to let you know that the reported issue has been fixed and rolled out in our weekly patch release. We kindly request that you upgrade the syncfusion_flutter_charts package to the latest version below.

Version: https://pub.dev/packages/syncfusion_flutter_charts/versions/25.1.38

If you have any further queries, please feel free to reach out to us.

Regards, Lokesh P.

barilki commented 1 month ago

Syncfusion is now updated to the latest version, and the error is fixed.

However, I'm still having a problem. Previously, I could scroll the chart in the dropdown, but with the new version (25.1.39+1), I can't anymore.

barilki commented 1 month ago

@LokeshPalani

PreethikaSelvam commented 1 month ago

Hi @barilki,

We can replicate the reported issue regarding the ‘chart not absorbing the pan gesture when placed inside the page view’ at our end and have already logged bug report for it in our feedback portal. This issue is scheduled to be fixed in our upcoming weekly release on 23, April 2024. We will update you here once the release is rolled out and we appreciate your patience until then. You can also track the status of the bug with the feedback below.

FR Link: https://www.syncfusion.com/feedback/51529/chart-is-not-absorbing-the-pan-gesture-when-placed-inside-the-page-view

Regards,

Preethika Selvam.

LokeshPalani commented 3 weeks ago

Hi @barilki,

We would like to let you know that the reported issue is fixed and rolled out in our service pack release. We kindly request you to upgrade the syncfusion_flutter_charts package to the latest version below.

Version: https://pub.dev/packages/syncfusion_flutter_charts/versions/25.2.3+1

Root cause: During zooming flow changes, we utilized ScaleGesture to handle pinching and implemented code changes for panning. However, when we wrapped the chart widgets inside a PageView, drag gestures took priority over scale gestures, resulting in page view swiping occurring while attempting to pan the chart.

Regards, Lokesh P.