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
Hey,
I've successfully implemented flutter_math in a RichText widget (see znjameswu/flutter_math#29 (comment)). But I still have some problems :
======== Exception caught by rendering library =====================================================
The following _CastError was thrown during performLayout():
Null check operator used on a null value
The relevant error-causing widget was:
RichText file:///D:/Hugo/Projets/Flutter/bacomathiques/lib/pages/html/widgets/math_widget.dart:41:12
When the exception was thrown, this was the stack:
#0 MultiscriptsLayoutDelegate.performHorizontalIntrinsicLayout (package:flutter_math_fork/src/render/layout/multiscripts.dart:136:53)
#1 IntrinsicLayoutDelegate.performLayout (package:flutter_math_fork/src/render/layout/custom_layout.dart:266:19)
#2 RenderCustomLayout.performLayout (package:flutter_math_fork/src/render/layout/custom_layout.dart:198:27)
#3 RenderObject.layout (package:flutter/src/rendering/object.dart:1784:7)
#4 RenderLine.performLayout (package:flutter_math_fork/src/render/layout/line.dart:332:15)
...
The following RenderObject was being processed when the exception was fired: RenderCustomLayout<_ScriptPos>#19c04 relayoutBoundary=up35 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
... parentData: offset=Offset(0.0, 0.0); canBreakBefore = false; customSize = false; trailingMargin = 4.444444444444445; alignerOrSpacer = false (can use size)
... constraints: BoxConstraints(unconstrained)
... size: MISSING
RenderObject: RenderCustomLayout<_ScriptPos>#19c04 relayoutBoundary=up35 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
parentData: offset=Offset(0.0, 0.0); canBreakBefore = false; customSize = false; trailingMargin = 4.444444444444445; alignerOrSpacer = false (can use size)
constraints: BoxConstraints(unconstrained)
size: MISSING
====================================================================================================
The problem seems to be the following line (in src/render/layout/multiscripts.dart) :
The text was updated successfully, but these errors were encountered:
It seems it was just a problem with line breaking on \displaystyle{\int_1^4 2x + 1 \, \mathrm{d}x = \left[ x(x+1) \right]_1^4 = 4(4+1) - 1(1+1) = 20-2 = 18}. I have removed the displaystyle and it works.
I leave this issue opened in case you're interested but feel free to close it 😉
Hey,
I've successfully implemented
flutter_math
in aRichText
widget (see znjameswu/flutter_math#29 (comment)). But I still have some problems :The problem seems to be the following line (in
src/render/layout/multiscripts.dart
) :The text was updated successfully, but these errors were encountered: