@@ -822,7 +822,13 @@ class MathBlock extends StatelessWidget {
822
822
children: [TextSpan (text: node.texSource)])));
823
823
}
824
824
825
- return _Katex (inline: false , nodes: nodes);
825
+ return Center (
826
+ child: Directionality (
827
+ textDirection: TextDirection .ltr,
828
+ child: SingleChildScrollViewWithScrollbar (
829
+ scrollDirection: Axis .horizontal,
830
+ child: _Katex (
831
+ nodes: nodes))));
826
832
}
827
833
}
828
834
@@ -835,24 +841,15 @@ const kBaseKatexTextStyle = TextStyle(
835
841
836
842
class _Katex extends StatelessWidget {
837
843
const _Katex ({
838
- required this .inline,
839
844
required this .nodes,
840
845
});
841
846
842
- final bool inline;
843
847
final List <KatexNode > nodes;
844
848
845
849
@override
846
850
Widget build (BuildContext context) {
847
851
Widget widget = _KatexNodeList (nodes: nodes);
848
852
849
- if (! inline) {
850
- widget = Center (
851
- child: SingleChildScrollViewWithScrollbar (
852
- scrollDirection: Axis .horizontal,
853
- child: widget));
854
- }
855
-
856
853
return Directionality (
857
854
textDirection: TextDirection .ltr,
858
855
child: DefaultTextStyle (
@@ -1274,7 +1271,7 @@ class _InlineContentBuilder {
1274
1271
: WidgetSpan (
1275
1272
alignment: PlaceholderAlignment .baseline,
1276
1273
baseline: TextBaseline .alphabetic,
1277
- child: _Katex (inline : true , nodes: nodes));
1274
+ child: _Katex (nodes: nodes));
1278
1275
1279
1276
case GlobalTimeNode ():
1280
1277
return WidgetSpan (alignment: PlaceholderAlignment .middle,
0 commit comments