It is hard to know but here some points:
I would start here. In this line: #1 RichText.createRenderObject we have this method
@override
RenderParagraph createRenderObject(BuildContext context) {
assert(textDirection != null || debugCheckHasDirectionality(context));
return RenderParagraph(text,
textAlign: textAlign,
textDirection: textDirection ?? Directionality.of(context),
softWrap: softWrap,
overflow: overflow,
textScaler: textScaler,
maxLines: maxLines,
strutStyle: strutStyle,
textWidthBasis: textWidthBasis,
textHeightBehavior: textHeightBehavior,
locale: locale ?? Localizations.maybeLocaleOf(context),
registrar: selectionRegistrar,
selectionColor: selectionColor,
);
}
And here #0 Directionality.of:
static TextDirection of(BuildContext context) {
assert(debugCheckHasDirectionality(context));
final Directionality widget = context.dependOnInheritedWidgetOfExactType<Directionality>()!;
return widget.textDirection;
}
And here debugCheckHasDirectionality: https://api.flutter.dev/flutter/widgets/debugCheckHasDirectionality.html
Do you have access of this computer, try to trace in debugCheckHasDirectionality.