Closed bhattishb92 closed 1 week ago
Same issue, up
same issue ( not working when using const class in my case)
Hi All,
We have tried to replicate the reported issue regarding tooltip rendering using your code snippet. Unfortunately, we are not able to reproduce the reported issue. However, we suspect that your widget is dynamically rebuilding. According to the current implementation, when the chart widget rebuilds dynamically, the tooltip has been disabled, resulting in it being hidden; this is a currently behavior. We kindly ask you to verify this in your application.
If this is not your case, we kindly request you to try to replicate the reported issue in the below attached test sample and revert us so that it will help us assist you in a better way.
Output:
Regards,
Preethika Selvam. gh2042.zip
@PreethikaSelvam Thanks alot. Yes the issue is my UI is continuously rebuilding (I didn't find out why), but I replace Obx Builder with GetBuilder and now everything works absolutely fine. Again thanks
Bug description
I get a unique issue in my code, I'm using SfCartesianChart with DateTimeAxis, the TooltipBehavior only works with the const class but when ever I pass some parameter to the class, It stops showing
In my code, SampleLineChart class is working fine but the LineChartScreen do not showing the tooltip
Steps to reproduce
remove the const keyword from the chart class
Code sample
Code sample
```dart GridView.builder( padding: const EdgeInsets.only( left: 10, right: 10) .r, shrinkWrap: true, itemCount: model.analyticsController .graphList.length + 1, physics: const NeverScrollableScrollPhysics(), gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( childAspectRatio: 490 / 420, mainAxisSpacing: 20.h, crossAxisSpacing: 20.w, crossAxisCount: 3), itemBuilder: (context, index) { if (index == 0) { // passing the class as const and working return const SampleLineChart(); } return LineChartScreen( graphModel: model.analyticsController .graphList[index - 1], ); }) class SampleLineChart extends StatefulWidget { const SampleLineChart({super.key}); @override StateScreenshots or Video
Screenshots / Video demonstration
[Upload media here]https://github.com/user-attachments/assets/cae1a26c-8254-4e21-8f5f-aaca93f7e2c7
Stack Traces
Stack Traces
```dart [Add the Stack Traces here] ```On which target platforms have you observed this bug?
Web
Flutter Doctor output
Doctor output
```console [✓] Flutter (Channel stable, 3.22.2, on macOS 14.4.1 23E224 darwin-arm64, locale en-US) • Flutter version 3.22.2 on channel stable at /Users/bhatti/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 761747bfc5 (3 months ago), 2024-06-05 22:15:13 +0200 • Engine revision edd8546116 • Dart version 3.4.3 • DevTools version 2.34.3 [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/bhatti/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.9+0-17.0.9b1087.7-11185874) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 15.3) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15E204a • CocoaPods version 1.15.2 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2023.2) • 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.9+0-17.0.9b1087.7-11185874) [✓] VS Code (version 1.92.2) • VS Code at /Users/bhatti/Documents/Visual Studio Code.app/Contents • Flutter extension version 3.94.0 ```