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

Failed assertion: line 1147: '<optimized out>': is not true. #125

Closed
sm2017 opened this issue Nov 21, 2020 · 1 comment
Closed

Failed assertion: line 1147: '<optimized out>': is not true. #125

sm2017 opened this issue Nov 21, 2020 · 1 comment

Comments

@sm2017
Copy link

sm2017 commented Nov 21, 2020

I am using pin_code_fields@6.0.1 , When I tap field and it focused , I get this error

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

The relevant error-causing widget was: 
  PinCodeTextField file:///C:/Projects/myapp/lib/forms/verification_form.dart:163:28
When the exception was thrown, this was the stack: 
#2      Paint.color= (dart:ui/painting.dart:1147:12)
#3      CursorPainter.paint (package:pin_code_fields/src/cursor_painter.dart:14:9)
#4      RenderCustomPaint._paintWithPainter (package:flutter/src/rendering/custom_paint.dart:531:13)
#5      RenderCustomPaint.paint (package:flutter/src/rendering/custom_paint.dart:572:7)
#6      RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2311:7)
...
The following RenderObject was being processed when the exception was fired: RenderCustomPaint#5978a relayoutBoundary=up5
...  parentData: <none> (can use size)
...  constraints: BoxConstraints(0.0<=w<=40.0, 0.0<=h<=48.0)
...  size: Size(0.0, 28.0)
RenderObject: RenderCustomPaint#5978a relayoutBoundary=up5
  parentData: <none> (can use size)
  constraints: BoxConstraints(0.0<=w<=40.0, 0.0<=h<=48.0)
  size: Size(0.0, 28.0)

@adar2378
Copy link
Owner

Setting the cursor color solves the problem
#120 (comment)

@sm2017 sm2017 closed this as completed Nov 29, 2020
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