Skip to content

Exception thrown when using "$ \hat f(\xi) = \int_{-\infty}^\infty f(x)e^{- 2\pi i \xi x}\mathrm{d}x $"

======== Exception caught by rendering library =====================================================
Null check operator used on a null value
The relevant error-causing widget was: 
  KaTeX file:///Users/xxx/katex_flutter/example/lib/main.dart:63:41



The following _CastError was thrown during paint():
Null check operator used on a null value

The relevant error-causing widget was: 
  KaTeX file:///Users/xxx/katex_flutter/example/lib/main.dart:63:41
When the exception was thrown, this was the stack: 
#0      TextPainter.paint (package:flutter/src/painting/text_painter.dart:624:36)
#1      RenderParagraph.paint (package:flutter/src/rendering/paragraph.dart:700:18)
#2      RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2311:7)
#3      PaintingContext.paintChild (package:flutter/src/rendering/object.dart:189:13)
#4      RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2616:15)
...
The following RenderObject was being processed when the exception was fired: RenderParagraph#555c8 relayoutBoundary=up4
...  needs compositing
...  parentData: offset=Offset(189.0, 97.0); flex=null; fit=null (can use size)
...  constraints: BoxConstraints(0.0<=w<=784.0, 0.0<=h<=Infinity)
...  size: Size(406.0, 16.0)
...  textAlign: start
...  textDirection: ltr
...  softWrap: wrapping at box width
...  overflow: clip
...  locale: en_US
...  maxLines: unlimited
RenderObject: RenderParagraph#555c8 relayoutBoundary=up4
  needs compositing
  parentData: offset=Offset(189.0, 97.0); flex=null; fit=null (can use size)
  constraints: BoxConstraints(0.0<=w<=784.0, 0.0<=h<=Infinity)
  size: Size(406.0, 16.0)
  textAlign: start
  textDirection: ltr
  softWrap: wrapping at box width
  overflow: clip
  locale: en_US
  maxLines: unlimited
...  text: TextSpan
...    debugLabel: (englishLike body1 2014).merge(blackMountainView bodyText2)
...    inherit: false
...    color: Color(0xdd000000)
...    family: Roboto
...    size: 14.0
...    weight: 400
...    baseline: alphabetic
...    decoration: TextDecoration.none
...    : TextSpan
...      debugLabel: (englishLike body1 2014).merge(blackMountainView bodyText2)
...      inherit: false
...      color: Color(0xdd000000)
...      family: Roboto
...      size: 14.0
...      weight: 400
...      baseline: alphabetic
...      decoration: TextDecoration.none
...      : WidgetSpan#c8f5c
...        alignment: middle
Edited by Dawei