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.55k stars 756 forks source link

syncfusion_flutter_charts-26.2.8/lib/src/charts/common/core_tooltip.dart:168:22: Error: The method 'markNeedsBuild' isn't defined for the class 'RenderConstrainedLayoutBuilder<Constraints, RenderObject>'. #2020

Open AgnelSelvan opened 1 month ago

AgnelSelvan commented 1 month ago

Bug description

After updating the Flutter version to 3.24.0, facing an issue in syncfusion_flutter_charts something related to 'markNeedsBuild'.

Syncfusion Version syncfusion_flutter_charts: ^26.2.8 Platform MacOS

Steps to reproduce

  1. Upgrade Flutter to the latest version i.e. 3.24

Code sample

Code sample ```dart SfCartesianChart( zoomPanBehavior: ZoomPanBehavior( enablePanning: true, enableMouseWheelZooming: true, enablePinching: true, ), plotAreaBorderWidth: 0, title: ChartTitle(text: title), primaryXAxis: CategoryAxis( majorGridLines: const MajorGridLines(width: 0), title: AxisTitle(text: "Category"), interval: 1, labelRotation: 90, ), primaryYAxis: NumericAxis( axisLine: const AxisLine(width: 0), title: AxisTitle(text: "Amount in Rs"), labelFormat: '₹ {value}', majorTickLines: const MajorTickLines(size: 0), ), series: _getDefaultColumnSeries(datas), tooltipBehavior: tooltipBehavior, ) ```

Screenshots or Video

Screenshots / Video demonstration https://github.com/user-attachments/assets/a105ba50-6107-4891-9ea0-7ad3d49436d3

Stack Traces

Stack Traces ```dart ../../../.pub-cache/hosted/pub.dev/syncfusion_flutter_charts-26.2.8/lib/src/charts/base.dart:3317:7: Error: The method 'markNeedsBuild' isn't defined for the class 'RenderLoadingIndicator'. - 'RenderLoadingIndicator' is from 'package:syncfusion_flutter_charts/src/charts/base.dart' ('../../../.pub-cache/hosted/pub.dev/syncfusion_flutter_charts-26.2.8/lib/src/charts/base.dart'). Try correcting the name to the name of an existing method, or defining a method named 'markNeedsBuild'. markNeedsBuild(); ^^^^^^^^^^^^^^ ../../../.pub-cache/hosted/pub.dev/syncfusion_flutter_charts-26.2.8/lib/src/charts/cartesian_chart.dart:1367:22: Error: The method 'markNeedsBuild' isn't defined for the class 'RenderConstrainedLayoutBuilder'. - 'RenderConstrainedLayoutBuilder' is from 'package:flutter/src/widgets/layout_builder.dart' ('../../tools/flutter/packages/flutter/lib/src/widgets/layout_builder.dart'). - 'Constraints' is from 'package:flutter/src/rendering/object.dart' ('../../tools/flutter/packages/flutter/lib/src/rendering/object.dart'). - 'RenderObject' is from 'package:flutter/src/rendering/object.dart' ('../../tools/flutter/packages/flutter/lib/src/rendering/object.dart'). Try correcting the name to the name of an existing method, or defining a method named 'markNeedsBuild'. renderObject.markNeedsBuild(); ^^^^^^^^^^^^^^ Target kernel_snapshot_program failed: Exception Command PhaseScriptExecution failed with a nonzero exit code warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Flutter Assemble' from project 'Runner') ** BUILD FAILED ** Error: Build process failed Exited (1). ```

On which target platforms have you observed this bug?

macOS

Flutter Doctor output

Doctor output ```console [✓] Flutter (Channel stable, 3.24.0, on macOS 14.6 23G80 darwin-arm64, locale en-GB) • Flutter version 3.24.0 on channel stable at /Users/a.selvan/Documents/tools/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 80c2e84975 (11 days ago), 2024-07-30 23:06:49 +0700 • Engine revision b8800d88be • Dart version 3.5.0 • DevTools version 2.37.2 [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/a.selvan/Library/Android/sdk • Platform android-34, build-tools 34.0.0 • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 15.4) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15F31d • CocoaPods version 1.15.2 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2023.3) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160) [✓] VS Code (version 1.92.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.94.0 [✓] VS Code (version 1.89.1) • VS Code at /Users/a.selvan/Downloads/Visual Studio Code.app/Contents • Flutter extension version 3.94.0 [✓] Connected device (4 available) • Mr.Useless iPhone (mobile) • 00008030-000959562233402E • ios • iOS 18.0 22A5307i • macOS (desktop) • macos • darwin-arm64 • macOS 14.6 23G80 darwin-arm64 • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 14.6 23G80 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 127.0.6533.100 [✓] Network resources • All expected network resources are available. • No issues found! ```
JuLoSpace commented 1 month ago

I have also problem

hissein commented 1 month ago

I have also problem after i updating my flutter version to 3.24.0

BrahimAkar commented 1 month ago

Same problem after upgrading Flutter to 3.24.0

AlaaCherbib commented 1 month ago

same problem

enoch-aik commented 1 month ago

Same problem here as well

ahmeddarafat commented 1 month ago

same problem

ilovelinux commented 1 month ago

Duplicate of https://github.com/syncfusion/flutter-widgets/issues/2008 and https://github.com/syncfusion/flutter-widgets/issues/1907

tl;dr: The fix will be released in mid September [source] Solution: Use the unofficial workaround or downgrade Flutter to 3.22 until the next release

Luvti commented 1 month ago

as a temporary solution for those who migrate to Flutter 3.24 use:

syncfusion_flutter_charts:
    git:
      url: https://github.com/Luvti/flutter-widgets
      path: packages/syncfusion_flutter_charts
      ref: 15e3c4a95e3cf2e2393755bf5aa11c0206ed6dea #flutter/3.24
rahmanrezaee commented 1 month ago

Same problem

elirehema commented 1 month ago

Tried @Luvti solution seems to be working. It can save us for some time while waiting for a fix in the package

PreethikaSelvam commented 1 month ago

Hi All,

The reported issue arises because the Flutter SDK was upgraded to version 3.24.0 on August 6, 2024, while our packages are currently compatible with Flutter SDK version 3.22.3. We have begun evaluating the compatibility and feasibility of updating our packages to work with the latest Flutter version, 3.24.0. We plan to make our packages compatible and include them in our Volume 3 main release, which is expected to be rolled out in the second week of September. In the meantime, we kindly request that you use Flutter SDK version 3.22.3 when working with our syncfusion_flutter_charts package.

Regards, Preethika Selvam.

fsteinwender commented 1 month ago

Same probleme here!

MahdiForughi commented 1 month ago

same problem here.

ahmeddarafat commented 1 month ago

same problem here.

Try @Luvti solution, It's a temp solution while waiting for a fix in the package in Sep

imran4340 commented 1 month ago

same error here on windows

Luvti commented 1 month ago

same error here on windows

as a temporary solution for those who migrate to Flutter 3.24 use:

syncfusion_flutter_charts:
    git:
      url: https://github.com/Luvti/flutter-widgets
      path: packages/syncfusion_flutter_charts
      ref: 15e3c4a95e3cf2e2393755bf5aa11c0206ed6dea #flutter/3.24
AmmarTN commented 1 month ago

same error here on windows

as a temporary solution for those who migrate to Flutter 3.24 use:

syncfusion_flutter_charts:
    git:
      url: https://github.com/Luvti/flutter-widgets
      path: packages/syncfusion_flutter_charts
      ref: 15e3c4a95e3cf2e2393755bf5aa11c0206ed6dea #flutter/3.24

failed to clone it for me any idea why ?

ilovelinux commented 1 month ago

same error here on windows

as a temporary solution for those who migrate to Flutter 3.24 use:

syncfusion_flutter_charts:
    git:
      url: https://github.com/Luvti/flutter-widgets
      path: packages/syncfusion_flutter_charts
      ref: 15e3c4a95e3cf2e2393755bf5aa11c0206ed6dea #flutter/3.24

failed to clone it for me any idea why ?

Try again.

rakeshdas369 commented 1 month ago

The Flutter 3.24.0 is on stable channel and this plugin syncfusion_flutter_charts is not compatible with it due to this error. It would require prompt fix.

hafidzaini commented 4 weeks ago

i need this fix too 😰

hafidzaini commented 4 weeks ago
syncfusion_flutter_charts:
    git:
      url: https://github.com/Luvti/flutter-widgets
      path: packages/syncfusion_flutter_charts
      ref: 15e3c4a95e3cf2e2393755bf5aa11c0206ed6dea #flutter/3.24

[ff] flutter pub get --no-example Resolving dependencies... Because every version of syncfusion_flutter_charts from git depends on syncfusion_flutter_core from git and ff depends on syncfusion_flutter_core from hosted, syncfusion_flutter_charts from git is forbidden. So, because ff depends on syncfusion_flutter_charts from git, version solving failed.

forbidden if i use syncfusion_flutter_core too 😰

hafidzaini commented 4 weeks ago

Duplicate of #2008 and #1907

tl;dr: The fix will be released in mid September [source] Solution: Use the unofficial workaround or downgrade Flutter to 3.22 until the next release

thanks, now i should pull all syncfusion from git then

talski commented 4 weeks ago

this repository is not up to date, latest commit is 2 months old, package version from pub.dev differs from here

newselfDevops commented 3 weeks ago

please fix this issue, the package is not working on Flutter 3.24.0

viniciusddrft commented 3 weeks ago

same problem

gauravmehta13 commented 3 weeks ago
syncfusion_flutter_charts:
    git:
      url: https://github.com/Luvti/flutter-widgets
      path: packages/syncfusion_flutter_charts
      ref: 15e3c4a95e3cf2e2393755bf5aa11c0206ed6dea #flutter/3.24

You'll need to use like

dependency_overrides:
  syncfusion_flutter_charts:
    git:
      url: https://github.com/Luvti/flutter-widgets
      path: packages/syncfusion_flutter_charts
      ref: 15e3c4a95e3cf2e2393755bf5aa11c0206ed6dea #flutter/3.24
  syncfusion_flutter_core:
    git:
      url: https://github.com/Luvti/flutter-widgets
      path: packages/syncfusion_flutter_core
      ref: 15e3c4a95e3cf2e2393755bf5aa11c0206ed6dea #flutter/3.24
ajay-zartek commented 2 weeks ago

same here

usmansiddiqui12321 commented 1 week ago
syncfusion_flutter_charts:
    git:
      url: https://github.com/Luvti/flutter-widgets
      path: packages/syncfusion_flutter_charts
      ref: 15e3c4a95e3cf2e2393755bf5aa11c0206ed6dea #flutter/3.24

You'll need to use like

dependency_overrides:
  syncfusion_flutter_charts:
    git:
      url: https://github.com/Luvti/flutter-widgets
      path: packages/syncfusion_flutter_charts
      ref: 15e3c4a95e3cf2e2393755bf5aa11c0206ed6dea #flutter/3.24
  syncfusion_flutter_core:
    git:
      url: https://github.com/Luvti/flutter-widgets
      path: packages/syncfusion_flutter_core
      ref: 15e3c4a95e3cf2e2393755bf5aa11c0206ed6dea #flutter/3.24

This Worked For me Just add in dependency_overrides not in dependencies

withden commented 3 days ago

I think they updated (Now it's compatible with Flutter 3.24): https://pub.dev/packages/syncfusion_flutter_charts/changelog

ThilipChandru commented 2 days ago

Hi All,

Thank you for your patience. We have upgraded our Flutter Charts package to be compatible with Flutter SDK 3.24.0. We kindly request you to upgrade Flutter Charts to the latest version.

Charts: https://pub.dev/packages/syncfusion_flutter_charts/versions/26.2.14

Regards, Thilip Chandru.