Closed rich-j closed 2 days ago
I have the same issue after upgrading Flutter to version 3.24.0
me too.
only works with flutter version 3.22.0. Please update package soon to work with latest flutter stable version.
I'm facing the same issue.
Same issue on flutter web.
Yup, blocked by this issue!
../../../.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<Constraints, RenderObject>'.
'RenderObject' is from 'package:flutter/src/rendering/object.dart' ('../../../sdk/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();
mee too same error please update to new stable flutter version
Any workarounds/ working forks/ suggestions?
Running Gradle task 'assembleDebug'...
../../../.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<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.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/common/core_tooltip.dart:168: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.8/lib/src/charts/common/core_legend.dart:452: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.8/lib/src/charts/common/element_widget.dart:117:5: Error: The method 'markNeedsBuild' isn't defined for the class 'RenderChartElementLayoutBuilder<T, D>'.
- 'RenderChartElementLayoutBuilder' is from 'package:syncfusion_flutter_charts/src/charts/common/element_widget.dart' ('../../../.pub-cache/hosted/pub.dev/syncfusion_flutter_charts-26.2.8/lib/src/charts/common/element_widget.dart').
Try correcting the name to the name of an existing method, or defining a method named 'markNeedsBuild'.
markNeedsBuild();
^^^^^^^^^^^^^^
Target kernel_snapshot_program failed: Exception
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
Same issue on windows and linux flutter web.
It might be the case that you need to change markNeedsBuild
to markNeedsLayout
as the latter is implemented on the RenderObject
But I'm not a hundred percent sure, it might cause unnecessary repaints, maybe another mark method would better fit the intentions. It did work on my side, tough.
../../../.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<Constraints, RenderObject>'.
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.
It might be the case that you need to change
markNeedsBuild
tomarkNeedsLayout
as the latter is implemented on theRenderObject
But I'm not a hundred percent sure, it might cause unnecessary repaints, maybe another mark method would better fit the intentions. It did work on my side, tough.
This resolved the issue for me. The project is now building.
This resolved the issue for me. The project is now building.
The two calls might not be equivalent. Layouting might do less than a full rebuild (of a part). This could potentially be some large refactor if they for example want to either introduce keys to widgets to enforce dirtiness by updating the key, or use other state management. A quick fix may decrease UI performance. The best case scenario is if the mark layout is enough.
Indeed, if you check with my PR #2013 , I tried to understand the intention and rebuild the layout in one case and repaint in another, but I might have misunderstood, hence, feels free to improve.
same issue for me too.
same issue
Same here, I fixed it internally by changing markneedsbuild to markneedspaint and markneedslayout.
Same here, I fixed it internally by changing markneedsbuild to markneedspaint and markneedslayout.
how did you do it?
Same here, I fixed it internally by changing markneedsbuild to markneedspaint and markneedslayout.
how did you do it?
you might want to check the changes in #2013. You can make these changes in the local .pub-cache (that is only for you), or you use the packages directly in your code.
Same here, I fixed it internally by changing markneedsbuild to markneedspaint and markneedslayout.
how did you do it?
you might want to check the changes in #2013. You can make these changes in the local .pub-cache (that is only for you), or you use the packages directly in your code.
I cant really find the .pub-cache. Can you help me?
Same here, I fixed it internally by changing markneedsbuild to markneedspaint and markneedslayout.
how did you do it?
you might want to check the changes in #2013. You can make these changes in the local .pub-cache (that is only for you), or you use the packages directly in your code.
I cant really find the .pub-cache. Can you help me?
you can find the exact location of the dart file in the error message:
'RenderChartElementLayoutBuilder' is from 'package:syncfusion_flutter_charts/src/charts/common/element_widget.dart' ('../../../.pub-cache/hosted/pub.dev/syncfusion_flutter_charts-26.2.8/lib/src/charts/common/element_widget.dart').
The second file path is the location of the file to edit.
Same here, I fixed it internally by changing markneedsbuild to markneedspaint and markneedslayout.
how did you do it?
you might want to check the changes in #2013. You can make these changes in the local .pub-cache (that is only for you), or you use the packages directly in your code.
Unfortunately the GitHub repositories are not the work repositories for SyncFusion, so I doubt they'll merge your PR, but it can help others.
Same here, I fixed it internally by changing markneedsbuild to markneedspaint and markneedslayout.
how did you do it?
you might want to check the changes in #2013. You can make these changes in the local .pub-cache (that is only for you), or you use the packages directly in your code.
I cant really find the .pub-cache. Can you help me?
you can find the exact location of the dart file in the error message:
'RenderChartElementLayoutBuilder' is from 'package:syncfusion_flutter_charts/src/charts/common/element_widget.dart' ('../../../.pub-cache/hosted/pub.dev/syncfusion_flutter_charts-26.2.8/lib/src/charts/common/element_widget.dart').
The second file path is the location of the file to edit.
Thanks, but I try it and still I get the same error message. By the way, I used github in production for my ios app.
Got the same issue with 3.24.0 Changing renderObject.markNeedsBuild(); to renderObject.markNeedsLayout(); solved issue, but there is also a same thing like markNeedsBuild in base.dart file, what is complete solution for this?
Same here, I fixed it internally by changing markneedsbuild to markneedspaint and markneedslayout.
how did you do it?
you might want to check the changes in #2013. You can make these changes in the local .pub-cache (that is only for you), or you use the packages directly in your code.
I cant really find the .pub-cache. Can you help me?
you can find the exact location of the dart file in the error message:
'RenderChartElementLayoutBuilder' is from 'package:syncfusion_flutter_charts/src/charts/common/element_widget.dart' ('../../../.pub-cache/hosted/pub.dev/syncfusion_flutter_charts-26.2.8/lib/src/charts/common/element_widget.dart').
The second file path is the location of the file to edit.
Thanks, but I try it and still I get the same error message. By the way, I used github in production for my ios app.
Same issue for base.dart and element_widge.dart
Got the same issue with 3.24.0 Changing renderObject.markNeedsBuild(); to renderObject.markNeedsLayout(); solved issue, but there is also a same thing like markNeedsBuild in base.dart file, what is complete solution for this?
I did update the base.dart file as well, but I'm only guessing the intentions of the original author.
Got the same issue with 3.24.0 Changing renderObject.markNeedsBuild(); to renderObject.markNeedsLayout(); solved issue, but there is also a same thing like markNeedsBuild in base.dart file, what is complete solution for this?
I did update the base.dart file as well, but I'm only guessing the intentions of the original author.
where you update the base.dart? not able to find.
I created a ticket and got this feedback. They will fix it but will take time. I will be waiting till they fix it and not fix the other code as I will have to undo that as soon as they fix it.
Hi Jaco,
The reported issue occurs because our chart is currently compatible with Flutter SDK version 3.22.3. We already started checking compatibility and the possibility of upgrading our packages to be compatible with the latest Flutter version, v3.24.0. We will share further details within four business days. We appreciate your patience in the meantime.
Regards,
I created a ticket and got this feedback. They will fix it but will take time. I will be waiting till they fix it and not fix the other code as I will have to undo that as soon as they fix it.
Hi Jaco,
The reported issue occurs because our chart is currently compatible with Flutter SDK version 3.22.3. We already started checking compatibility and the possibility of upgrading our packages to be compatible with the latest Flutter version, v3.24.0. We will share further details within four business days. We appreciate your patience in the meantime.
Regards,
Downgraded the flutter version from 3.24.0 to 3.22.2 for now, because this is the only solution untill synscusion update there package. Please let everybody know here whenever you receive some update from their side Thank you
Hello. I am verifying that it builds correctly in my forked repository.
syncfusion_flutter_charts:
git:
url: https://github.com/iktakahiro/flutter-widgets.git
ref: support-flutter-3.24.0
path: packages/syncfusion_flutter_charts
syncfusion_flutter_core:
url: https://github.com/iktakahiro/flutter-widgets.git
ref: support-flutter-3.24.0
path: packages/syncfusion_flutter_core
syncfusion_localizations:
git:
url: https://github.com/iktakahiro/flutter-widgets.git
ref: support-flutter-3.24.0
path: packages/syncfusion_localizations
Please note that this is not an official fix, and support for Flutter versions below 3.24 may have been dropped.
Hello. I am verifying that it builds correctly in my forked repository.
syncfusion_flutter_charts: git: url: https://github.com/iktakahiro/flutter-widgets.git ref: support-flutter-3.24.0 path: packages/syncfusion_flutter_charts syncfusion_flutter_core: url: https://github.com/iktakahiro/flutter-widgets.git ref: support-flutter-3.24.0 path: packages/syncfusion_flutter_core syncfusion_localizations: git: url: https://github.com/iktakahiro/flutter-widgets.git ref: support-flutter-3.24.0 path: packages/syncfusion_localizations
Please note that this is not an official fix, and support for Flutter versions below 3.24 may have been dropped.
will it works for me When I downgrade my flutter version to 3.22.3.
Hi @rich-j, @JacoFourie, @robertoltrocha, @IvanTrejoDev, @jvivasb20, @Hyunhyun12, @Some1Somewhere, @AlthafMjeelani, @PyramDev, @MrCsabaToth, @Kataglyphis, @fingineering, @leong2015, @ioma8, @malik19995, @lenin41211, @geekdmm0xff, @OmarBakry-eg, @TobeJavinz, @yogeshButani, @iktakahiro,
The reported issue arises because 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, v3.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 on second week of September.
Regards,
Preethika Selvam.
Hello. I am verifying that it builds correctly in my forked repository.
syncfusion_flutter_charts: git: url: https://github.com/iktakahiro/flutter-widgets.git ref: support-flutter-3.24.0 path: packages/syncfusion_flutter_charts syncfusion_flutter_core: url: https://github.com/iktakahiro/flutter-widgets.git ref: support-flutter-3.24.0 path: packages/syncfusion_flutter_core syncfusion_localizations: git: url: https://github.com/iktakahiro/flutter-widgets.git ref: support-flutter-3.24.0 path: packages/syncfusion_localizations
Please note that this is not an official fix, and support for Flutter versions below 3.24 may have been dropped.
Thank you for this. It seems, given the above reply, that we must rely on your kind efforts until mid-September. It's working for me so far.
I fixed it by downgrading to an earlier version of Flutter using the command
flutter downgrade
or
flutter downgrade v[flutter build version]
or
git checkout [flutter build version]
I am really angered as we are paying expensive syncfusion license and yet this widget is not compatible with flutter stable.
I am really angered as we are paying expensive syncfusion license and yet this widget is not compatible with flutter stable.
I think Flutter 3.24.0 has been long enough available on the beta channel to perform all tests and adjustments.
Hi @rich-j, @JacoFourie, @robertoltrocha, @IvanTrejoDev, @jvivasb20, @Hyunhyun12, @Some1Somewhere, @AlthafMjeelani, @PyramDev, @MrCsabaToth, @Kataglyphis, @fingineering, @leong2015, @ioma8, @malik19995, @lenin41211, @geekdmm0xff, @OmarBakry-eg, @TobeJavinz, @yogeshButani, @iktakahiro,
The reported issue arises because 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, v3.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 on second week of September.
Regards,
Preethika Selvam.
Second week of September?? Please publish a hot fix ASAP. Suggested workarounds do not work with syncfusion_flutter_pdf + syncfusion_flutter_pdfviewer.
Related PR that has broken this https://github.com/flutter/flutter/pull/147856, see https://github.com/flutter/flutter/pull/147856/files#diff-854702395b77500debdfd5503d08bb2fb61b03414adb3818f6f3c0a3f7caf44eL226.
Maybe this gives you an idea how to fix it (all tests fixed using this pattern) https://github.com/flutter/flutter/pull/147856/files#diff-d078821c55cd4390761f5928348ab73b271c76edb7c9a440af7edb08ad6896d7L40-R43.
Hi @rich-j, @JacoFourie, @robertoltrocha, @IvanTrejoDev, @jvivasb20, @Hyunhyun12, @Some1Somewhere, @AlthafMjeelani, @PyramDev, @MrCsabaToth, @Kataglyphis, @fingineering, @leong2015, @ioma8, @malik19995, @lenin41211, @geekdmm0xff, @OmarBakry-eg, @TobeJavinz, @yogeshButani, @iktakahiro, The reported issue arises because 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, v3.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 on second week of September. Regards, Preethika Selvam.
Second week of September?? Please publish a hot fix ASAP. Suggested workarounds do not work with syncfusion_flutter_pdf + syncfusion_flutter_pdfviewer.
I would wait for them to fix it. Nobody updates their app as soon as a new version of Flutter comes out. We allow time for it to become stable. This is a case in point. They did say they would work on it. They also don't look at Github for issues, log a ticket if you are a paying member.
same issues, how can fixed this quickly.
Hey all @rich-j, @JacoFourie, @robertoltrocha, @IvanTrejoDev, @jvivasb20, @Hyunhyun12, @Some1Somewhere, @AlthafMjeelani, @PyramDev, @MrCsabaToth, @Kataglyphis, @fingineering, @leong2015, @ioma8, @malik19995, @lenin41211, @geekdmm0xff, @OmarBakry-eg, @TobeJavinz, @yogeshButani, @iktakahiro
Syncfusion have updated their package just 1 hour ago with syncfusion_flutter_charts 26.2.9. Does syncfusion fixed that bug for flutter version 3.24.0??
../../.pub-cache/hosted/pub.dev/syncfusion_flutter_charts-26.2.9/lib/src/charts/common/core_tooltip.dart:168:22: Error: The method 'markNeedsBuild' isn't defined for the class 'RenderConstrainedLayoutBuilder<Constraints, RenderObject>'.
Hey all @rich-j, @JacoFourie, @robertoltrocha, @IvanTrejoDev, @jvivasb20, @Hyunhyun12, @Some1Somewhere, @AlthafMjeelani, @PyramDev, @MrCsabaToth, @Kataglyphis, @fingineering, @leong2015, @ioma8, @malik19995, @lenin41211, @geekdmm0xff, @OmarBakry-eg, @TobeJavinz, @yogeshButani, @iktakahiro
Syncfusion have updated their package just 1 hour ago with syncfusion_flutter_charts 26.2.9. Does syncfusion fixed that bug for flutter version 3.24.0??
hi , i have update all but its given the error same
../../.pub-cache/hosted/pub.dev/syncfusion_flutter_charts-26.2.9/lib/src/charts/common/core_tooltip.dart:168:22: Error: The method 'markNeedsBuild' isn't defined for the class 'RenderConstrainedLayoutBuilder<Constraints, RenderObject>'.
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.0, on macOS 12.7.6 21H1320 darwin-x64, locale en-IN)
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
✗ cmdline-tools component is missing
Run path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run flutter doctor --android-licenses
to accept the SDK licenses.
See https://flutter.dev/to/macos-android-setup for more details.
[!] Xcode - develop for iOS and macOS (Xcode 14.2)
! Flutter recommends a minimum Xcode version of 15.
Download the latest version or update via the Mac App Store.
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] VS Code (version 1.92.0)
[✓] Connected device (3 available)
[✓] Network resources
! Doctor found issues in 2 categories.
hii @MukeshWrms , can you please delete pubspec.lock, remove the packge, then again add by flutter pub add package-name then run the project and see the error is coming or not.
Note : I am just giving suggestion, i have not tested it with latest released version today by syncufusion
PubDev for syncfusion_flutter_charts 26.2.9 shows the issue still exists for Flutter stable release 3.24.
Pass static analysis. 0/50
0/50 points: code has no errors, warnings, lints, or formatting issues
Found 5 issues. Showing the first 2:
ERROR: The method 'markNeedsBuild' isn't defined for the type 'RenderLoadingIndicator'.
ERROR: The method 'markNeedsBuild' isn't defined for the type 'RenderConstrainedLayoutBuilder'.
i try and same issues again
hii @MukeshWrms , can you please delete pubspec.lock, remove the packge, then again add by flutter pub add package-name then run the project and see the error is coming or not.
Note : I am just giving suggestion, i have not tested it with latest released version today by syncufusion
Dear Sir,
i try and same issues again.
Hi @rich-j, @JacoFourie, @robertoltrocha, @IvanTrejoDev, @jvivasb20, @Hyunhyun12, @Some1Somewhere, @AlthafMjeelani, @PyramDev, @MrCsabaToth, @Kataglyphis, @fingineering, @leong2015, @ioma8, @malik19995, @lenin41211, @geekdmm0xff, @OmarBakry-eg, @TobeJavinz, @yogeshButani, @iktakahiro, The reported issue arises because 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, v3.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 on second week of September. Regards, Preethika Selvam.
Second week of September?? Please publish a hot fix ASAP. Suggested workarounds do not work with syncfusion_flutter_pdf + syncfusion_flutter_pdfviewer.
I would wait for them to fix it. Nobody updates their app as soon as a new version of Flutter comes out. We allow time for it to become stable. This is a case in point. They did say they would work on it. They also don't look at Github for issues, log a ticket if you are a paying member.
that's blatantly not true, especially with CI set up to pull from Flutter stable. There is a reason Flutter has master and beta channels and that reason is to enable testing prior to stable release. Postponing a fix for a month is not a good look for any company.
I would wait for them to fix it. Nobody updates their app as soon as a new version of Flutter comes out. We allow time for it to become stable. This is a case in point. They did say they would work on it. They also don't look at Github for issues, log a ticket if you are a paying member.
Flutter 3.24.0 is a stable release, of course we want to update our apps to use it now and not wait a month. And they do follow GitHub issues reported here.
My temporary workaround was to edit packages/flutter/lib/src/widgets/layout_builder.dart
, find mixin RenderConstrainedLayoutBuilder
and add there this code:
void markNeedsBuild() {
markNeedsLayout();
}
Good enough fix at least for development purposes, quickly looking I didn't notice any issues in charts either.
Bug description
Use the latest stable Flutter release and the build fails with
This appears to be the same as issue #1907 which was marked as completed because the user wasn't using the stable branch. We are using the stable branch.
Steps to reproduce
Use Flutter stable branch 3.24.0 with syncfusion_flutter_charts: ^26.2.8.
Code sample
Code sample
```dart environment: sdk: ">=3.5.0 <4.0.0" flutter: ">=3.24.0" dependencies: syncfusion_flutter_calendar: ^26.2.8 syncfusion_flutter_charts: ^26.2.8 syncfusion_flutter_datagrid: ^26.2.8 ```Screenshots or Video
-
Stack Traces
Stack Traces
```dart Failed to build iOS app Error (Xcode): ../../.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 'RenderConstrainedLayoutBuilderOn which target platforms have you observed this bug?
iOS
Flutter Doctor output
Doctor output
```console Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.24.0, on macOS 14.6 23G80 darwin-arm64, locale en-US) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.4) [✓] Chrome - develop for the web [✓] Android Studio (version 2024.1) [✓] IntelliJ IDEA Ultimate Edition (version 2024.1.5) [✓] Connected device (4 available) [✓] Network resources • No issues found! ```