You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
I try to display an EAN-8 barcode with value '90311130'.
But I get an exception 'RangeError (index): Invalid value: Not in range 0..9, inclusive: 10'
════════ Exception caught by rendering library ═════════════════════════════════
The following RangeError was thrown during paint():
RangeError (index): Invalid value: Not in range 0..9, inclusive: 10
User-created ancestor of the error-causing widget was
BarCodeImage
lib/pages/mobil_cards.dart:392
When the exception was thrown, this was the stack
#0 List.[] (dart:core-patch/growable_array.dart:147:60) #1 BarCodePainter._drawBarCodeEAN8
package:barcode_flutter/src/barcode_painter.dart:574 #2 BarCodePainter.paint
package:barcode_flutter/src/barcode_painter.dart:30 #3 RenderCustomPaint._paintWithPainter
package:flutter/…/rendering/custom_paint.dart:528 #4 RenderCustomPaint.paint
package:flutter/…/rendering/custom_paint.dart:566
...
The following RenderObject was being processed when the exception was fired: RenderCustomPaint#74661
RenderObject: RenderCustomPaint#74661
parentData: offset=Offset(5.0, 5.0) (can use size)
constraints: BoxConstraints(w=152.0, h=98.0)
size: Size(152.0, 98.0)
════════════════════════════════════════════════════════════════════════════════
The text was updated successfully, but these errors were encountered:
Hi, there's a fix on that issue. Please update to version 1.0.2
EAN-8 barcode with value '90311130' can render OK and scan correctly now.
I'll close this issue.
Hi!
I try to display an EAN-8 barcode with value '90311130'.
But I get an exception 'RangeError (index): Invalid value: Not in range 0..9, inclusive: 10'
return Center( child: Container( child: BarCodeImage( data: '90311130', codeType: BarCodeType.CodeEAN8, barHeight: 100.0, hasText: true, onError: (error) { print("Generate barcode failed. error msg: $error"); }, ), ));
Exception:
════════ Exception caught by rendering library ═════════════════════════════════
The following RangeError was thrown during paint():
RangeError (index): Invalid value: Not in range 0..9, inclusive: 10
User-created ancestor of the error-causing widget was
BarCodeImage
lib/pages/mobil_cards.dart:392
When the exception was thrown, this was the stack
#0 List.[] (dart:core-patch/growable_array.dart:147:60)
#1 BarCodePainter._drawBarCodeEAN8
package:barcode_flutter/src/barcode_painter.dart:574
#2 BarCodePainter.paint
package:barcode_flutter/src/barcode_painter.dart:30
#3 RenderCustomPaint._paintWithPainter
package:flutter/…/rendering/custom_paint.dart:528
#4 RenderCustomPaint.paint
package:flutter/…/rendering/custom_paint.dart:566
...
The following RenderObject was being processed when the exception was fired: RenderCustomPaint#74661
RenderObject: RenderCustomPaint#74661
parentData: offset=Offset(5.0, 5.0) (can use size)
constraints: BoxConstraints(w=152.0, h=98.0)
size: Size(152.0, 98.0)
════════════════════════════════════════════════════════════════════════════════
The text was updated successfully, but these errors were encountered: