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

Error: markNeedsBuild Method Not Defined during XCode build #2027

Open gobi-G opened 4 weeks ago

gobi-G commented 4 weeks ago

Bug description

I'm encountering a build error related to the syncfusion_flutter_charts package, specifically in the cartesian_chart.dart and base.dart files. The error indicates that the method markNeedsBuild is not defined for certain classes, leading to a failure in the compilation process.

../../.pub-cache/hosted/pub.dev/syncfusion_flutter_charts-26.2.9/lib/src/charts/cartesian_chart.dart:1367:22: Error: The method 'markNeedsBuild' isn't defined for the class 'RenderConstrainedLayoutBuilder<Constraints, RenderObject>'.
 - 'RenderConstrainedLayoutBuilder' is from 'package:flutter/src/widgets/layout_builder.dart' ('../../flutter/packages/flutter/lib/src/widgets/layout_builder.dart').
 - 'Constraints' is from 'package:flutter/src/rendering/object.dart' ('../../flutter/packages/flutter/lib/src/rendering/object.dart').
 - 'RenderObject' is from 'package:flutter/src/rendering/object.dart' ('../../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();
                     ^^^^^^^^^^^^^^

../../.pub-cache/hosted/pub.dev/syncfusion_flutter_charts-26.2.9/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.9/lib/src/charts/base.dart').
Try correcting the name to the name of an existing method, or defining a method named 'markNeedsBuild'.
      markNeedsBuild();
      ^^^^^^^^^^^^^^

Steps to reproduce

  1. Update to the latest version of the syncfusion_flutter_charts package (26.2.9).
  2. Try to build or run the project.
  3. Observe the build failure with the above error messages.

Code sample

Code sample ```dart [Add your code here] ```

Screenshots or Video

Screenshots / Video demonstration [Upload media here]

Stack Traces

Stack Traces ```dart [Add the Stack Traces here] ```

On which target platforms have you observed this bug?

iOS

Flutter Doctor output

Doctor output ```console [✓] Flutter (Channel stable, 3.24.0, on macOS 14.2.1 23C71 darwin-arm64, locale de-DE) • Flutter version 3.24.0 on channel stable at /Users/gobiganjeyamoorthy/fl utter • Upstream repository https://github.com/flutter/f lutter.git • Framework revision 80c2e84975 (vor 2 Wochen), 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/gobiganjeyamoorthy/Li brary/Android/sdk • Platform android-34, build-tools 34.0.0 • ANDROID_HOME = /Users/gobiganjeyamoorthy/Li brary/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jbr/Cont ents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185 874) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 15.4) • Xcode at /Applications/Xcode.app/Cont ents/Developer • Build 15F31d • CocoaPods version 1.15.2 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Go ogle Chrome [✓] Android Studio (version 2023.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.co m/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.co m/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185 874) [✓] VS Code (version 1.91.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.94.0 [✓] Connected device (4 available) • iPhone 15 Pro Max (mobile) • 959ED111-ED98-4027-A423-442908ABE601 • ios • com.apple.CoreSimulator.SimRuntime.iOS-17-5 (simulator) • macOS (desktop) • macos • darwin-arm64 • macOS 14.2.1 23C71 darwin-arm64 • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 14.2.1 23C71 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 127.0.6533.120 ! Error: Browsing on the local area network for iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac. The device must be opted into Developer Mode to connect wirelessly. (code -27) [✓] Network resources • All expected network resources are available. • No issues found! ```
sumitranjanDroider commented 3 weeks ago

I m also facing the same issue Error (Xcode): /Users/athentech/.pub-cache/hosted/pub.dev/syncfusion_flutter_charts-26.2.9/lib/src/charts/cartesian_chart.dart:1367:22: Error: The method 'markNeedsBuild' isn't defined for the class 'RenderConstrainedLayoutBuilder<Constraints, RenderObject>'.

Could not build the application for the simulator. Error launching application on iPhone 15 Pro Max.

St3v3W3lls commented 3 weeks ago

Yeah I'm having the same issue @sumitranjanDroider tag me if you've found a solution please

liamb09 commented 3 weeks ago

Same problem here. This comment on a similar issue helped. I just downgraded flutter to 3.22.3 with flutter downgrade 3.22.3 and the error went away.

hagiosolat commented 3 weeks ago

I have thesame issue. But downgrading for me is not the option. I think the issue should be resolved in time so as to keep up with flutter updated version on Visual studio code: build for android application also

Kindly tag me when this error is fixed.

St3v3W3lls commented 3 weeks ago

Yes, I also thing downgrading shouldn't be an option, I have other projects that have been modified to accommodate version 3.24. Downgrading just because of one project.....well do the math

PreethikaSelvam commented 3 weeks 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.

kururu-abdo commented 3 weeks 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.

stay up to date with flutter version. why you forcing devs to downgrade Flutter it is not an option for many

padgithub commented 3 weeks ago

Same bug

Rithwik-MRH commented 3 weeks ago

I have the same issue, trying to deal with it since a week i guess..... and downgrading is not possible.. please tag me in when resolved

NdukaO commented 2 weeks ago

Same issue for me. Downgrading is also not an option I want to consider. I'll probably have to disable that portion of my app or find another solution.

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

Rithwik-MRH commented 3 days ago

Thank you for informing me.

On Tue, Sep 10, 2024 at 5:18 PM Denish Navadiya @.***> wrote:

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

— Reply to this email directly, view it on GitHub https://github.com/syncfusion/flutter-widgets/issues/2027#issuecomment-2340444691, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYYGNXHBMCEATNI22L2O2JLZV3MCVAVCNFSM6AAAAABMUIGFQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBQGQ2DINRZGE . You are receiving this because you commented.Message ID: @.***>

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.