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

After updating to 18.2.44, I got a NoSuchMethodError.


I cannot provide a simple sample code for this bug because it only crash it a very complex widget tree. I guess the main problem is using Chart combined with ChangeNotifierProvider and Selector. For some unknown reason, the Chart was built two times before it first render.


I try to fix this bug myself. The bug is fixed after I making this change in

syncfusion_flutter_charts-18.2.44\lib\src\chart\axis\axis.dart at line 1122 and 1123.

Empty


Empty




I/flutter (27834): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════

I/flutter (27834): The following NoSuchMethodError was thrown building LayoutBuilder:

I/flutter (27834): The getter 'zoomFactor' was called on null.

I/flutter (27834): Receiver: null

I/flutter (27834): Tried calling: zoomFactor

I/flutter (27834):

I/flutter (27834): The relevant error-causing widget was:

I/flutter (27834): LayoutBuilder

I/flutter (27834): file:///C:/Dev/Flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_charts-18.2.44/lib/src/chart/base/chart_base.dart:1701:12

I/flutter (27834):

I/flutter (27834): When the exception was thrown, this was the stack:

I/flutter (27834): #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)

I/flutter (27834): #1 ChartAxis._calculateZoomRange (package:syncfusion_flutter_charts/src/chart/axis/axis.dart:1124:34)

I/flutter (27834): #2 DateTimeAxis.calculateVisibleRange (package:syncfusion_flutter_charts/src/chart/axis/datetime_axis.dart:400:7)

I/flutter (27834): #3 DateTimeAxis.applyRangePadding (package:syncfusion_flutter_charts/src/chart/axis/datetime_axis.dart:346:5)

I/flutter (27834): #4 DateTimeAxis._calculateRangeAndInterval (package:syncfusion_flutter_charts/src/chart/axis/datetime_axis.dart:272:7)

I/flutter (27834): #5 _ChartAxis._measureAxesBounds (package:syncfusion_flutter_charts/src/chart/axis/axis_panel.dart:115:14)

I/flutter (27834): #6 _ContainerArea._calculateBounds (package:syncfusion_flutter_charts/src/chart/base/chart_base.dart:1730:23)

I/flutter (27834): #7 _ContainerArea._initializeChart (package:syncfusion_flutter_charts/src/chart/base/chart_base.dart:1712:5)

I/flutter (27834): #8 _ContainerArea.build. (package:syncfusion_flutter_charts/src/chart/base/chart_base.dart:1705:18)

I/flutter (27834): #9 _LayoutBuilderElement._layout. (package:flutter/src/widgets/layout_builder.dart)

I/flutter (27834): #10 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2412:19)

I/flutter (27834): #11 _LayoutBuilderElement._layout (package:flutter/src/widgets/layout_builder.dart:95:11)

I/flutter (27834): #12 RenderObject.invokeLayoutCallback. (package:flutter/src/rendering/object.dart:1823:58)

I/flutter (27834): #13 PipelineOwner._enableMutationsToDirtySubtrees (package:flutter/src/rendering/object.dart:875:15)

I/flutter (27834): #14 RenderObject.invokeLayoutCallback (package:flutter/src/rendering/object.dart:1823:13)

I/flutter (27834): #15 RenderConstrainedLayoutBuilder.layoutAndBuildChild (package:flutter/src/widgets/layout_builder.dart:173:5)

I/flutter (27834): #16 _RenderLayoutBuilder.performLayout (package:flutter/src/widgets/layout_builder.dart:240:5)

I/flutter (27834): #17 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)

I/flutter (27834): #18 RenderConstrainedBox.performLayout (package:flutter/src/rendering/proxy_box.dart:259:13)

I/flutter (27834): #19 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)

I/flutter (27834): #20 _RenderLayoutBuilder.performLayout (package:flutter/src/widgets/layout_builder.dart:242:13)

I/flutter (27834): #21 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)

I/flutter (27834): #22 RenderFlex.performLayout (package:flutter/src/rendering/flex.dart:806:17)

I/flutter (27834): #23 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)

I/flutter (27834): #24 RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:206:11)

I/flutter (27834): #25 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)

I/flutter (27834): #26 RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:206:11)

I/flutter (27834): #27 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)

I/flutter (27834): #28 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)

I/flutter (27834): #29 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)

I/flutter (27834): #30 _ChartContainerBox.performLayout (package:syncfusion_flutter_charts/src/common/common.dart:27:11)

I/flutter (27834): #31 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)

I/flutter (27834): #32 RenderConstrainedBox.performLayout (package:flutter/src/rendering/proxy_box.dart:259:13)

I/flutter (27834): #33 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)

I/flutter (27834): #34 RenderFlex.performLayout (package:flutter/src/rendering/flex.dart:744:15)

I/flutter (27834): #35 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)

I/flutter (27834): #36 _RenderLayoutBuilder.performLayout (package:flutter/src/widgets/layout_builder.dart:242:13)

I/flutter (27834): #37 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)

I/flutter (27834): #38 MultiChildLayoutDelegate.layoutChild (package:flutter/src/rendering/custom_layout.dart:163:11)

I/flutter (27834): #39 _ScaffoldLayout.performLayout (package:flutter/src/material/scaffold.dart:477:7)

I/flutter (27834): #40 MultiChildLayoutDelegate._callPerformLayout (package:flutter/src/rendering/custom_layout.dart:232:7)

I/flutter (27834): #41 RenderCustomMultiChildLayoutBox.performLayout (package:flutter/src/rendering/custom_layout.dart:391:14)

I/flutter (27834): #42 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1584:7)

I/flutter (27834): #43 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:844:18)

I/flutter (27834): #44 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:344:19)

I/flutter (27834): #45 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:774:13)

I/flutter (27834): #46 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:283:5)

I/flutter (27834): #47 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1102:15)

I/flutter (27834): #48 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1041:9)

I/flutter (27834): #49 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:957:5)

I/flutter (27834): #53 _invoke (dart:ui/hooks.dart:259:10)

I/flutter (27834): #54 _drawFrame (dart:ui/hooks.dart:217:3)

I/flutter (27834): (elided 3 frames from package dart:async)

I/flutter (27834):

I/flutter (27834): ════════════════════════════════════════════════════════════════════════════════════════════════════