Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SfRadialGauge: 'dart:ui/painting.dart': Failed assertion: line 202: '<optimized out>': is not true. #124

Closed
iqfareez opened this issue Jan 24, 2021 · 4 comments

Comments

@iqfareez
Copy link

Error thrown only on first render (After run or hot restart, not happening in hot reload)

The log

Restarted application in 3,223ms.

════════ Exception caught by rendering library ═════════════════════════════════
The following assertion was thrown during paint():
'dart:ui/painting.dart': Failed assertion: line 202: '<optimized out>': is not true.

The relevant error-causing widget was
SfRadialGauge
lib\BMIGauge.dart:14
When the exception was thrown, this was the stack
#2      Color.withOpacity (dart:ui/painting.dart:202:12)
#3      NeedlePointerRenderer._renderNeedle
package:syncfusion_flutter_gauges/…/pointers/needle_pointer.dart:566
#4      NeedlePointerRenderer.drawPointer
package:syncfusion_flutter_gauges/…/pointers/needle_pointer.dart:547
#5      _NeedlePointerPainter.paint
package:syncfusion_flutter_gauges/…/gauge_painter/needle_pointer_painter.dart:91
#6      RenderCustomPaint._paintWithPainter
package:flutter/…/rendering/custom_paint.dart:536
...
The following RenderObject was being processed when the exception was fired: RenderCustomPaint#4c72a relayoutBoundary=up14
RenderObject: RenderCustomPaint#4c72a relayoutBoundary=up14
    parentData: <none> (can use size)
    constraints: BoxConstraints(0.0<=w<=186.4, 0.0<=h<=169.8)
    size: Size(186.4, 169.8)
════════════════════════════════════════════════════════════════════════════════

════════ Exception caught by rendering library ═════════════════════════════════
'dart:ui/painting.dart': Failed assertion: line 202: '<optimized out>': is not true.
The relevant error-causing widget was
SfRadialGauge
lib\BMIGauge.dart:14
════════════════════════════════════════════════════════════════════════════════

Part below repeats many time:

════════ Exception caught by rendering library ═════════════════════════════════
'dart:ui/painting.dart': Failed assertion: line 202: '<optimized out>': is not true.
The relevant error-causing widget was
SfRadialGauge
lib\BMIGauge.dart:14
════════════════════════════════════════════════════════════════════════════════

In case you want to see my code, it's in here

From pubspec.lock:

syncfusion_flutter_core: 18.4.35+1

syncfusion_flutter_gauges: 18.4.35

@Dharanipalani
Copy link

Hi @iqfareez,

We have analyzed your scenario, and the reported scenario arises due to the needle pointer animation type. We regret the inconvenience, and we will resolve this in our next weekly patch release which is expected to be rolled out on 1st week of February 2021. As of now, you can use other types of animations except for easeOutBack and elasticOut. We appreciate your patience until then.

NeedlePointer( animationType: AnimationType.linear )

Thanks,
Dharanitharan. P

@iqfareez
Copy link
Author

Thank you @Dharanipalani for your responses and workaround suggestion. Hope you can keep me updated. Cheers.

@Dharanipalani
Copy link

Hi @iqfareez,

We are happy to inform you that the reported issue has been fixed in our latest version v18.4.41. Now the needle pointer will not throw any exception with any type of animation. Please upgrade our gauge package to the latest version from the following link.

Latest version: https://pub.dev/packages/syncfusion_flutter_gauges/versions/18.4.41

Thanks,
Dharanitharan. P

@iqfareez
Copy link
Author

iqfareez commented Feb 2, 2021

Hi. I'm about to write thank you notes here, but you come earlier. I just upgraded and tested, and the error is not showing anymore. Thank you for your excellent support, syncfusion team! 🎉

@iqfareez iqfareez closed this as completed Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants