@@ -15,9 +15,9 @@ import 'content.dart';
15
15
/// and applies the CSS styles defined in .katex class in katex.scss :
16
16
/// https://github.com/KaTeX/KaTeX/blob/613c3da8/src/styles/katex.scss#L13-L15
17
17
///
18
- /// Requires the [style .fontSize] to be non-null.
19
- TextStyle mkBaseKatexTextStyle (TextStyle style , Color baseColor) {
20
- return style .copyWith (
18
+ /// Requires the [ambientStyle .fontSize] to be non-null.
19
+ TextStyle mkBaseKatexTextStyle (TextStyle ambientStyle , Color baseColor) {
20
+ return ambientStyle .copyWith (
21
21
////// Overrides of our own styles:
22
22
23
23
// Bold formatting is removed below by setting FontWeight.normal…
@@ -39,7 +39,7 @@ TextStyle mkBaseKatexTextStyle(TextStyle style, Color baseColor) {
39
39
40
40
////// From the .katex class in katex.scss:
41
41
42
- fontSize: style .fontSize! * 1.21 ,
42
+ fontSize: ambientStyle .fontSize! * 1.21 ,
43
43
fontFamily: 'KaTeX_Main' ,
44
44
height: 1.2 ,
45
45
fontWeight: FontWeight .normal,
@@ -54,11 +54,11 @@ TextStyle mkBaseKatexTextStyle(TextStyle style, Color baseColor) {
54
54
class KatexWidget extends StatelessWidget {
55
55
const KatexWidget ({
56
56
super .key,
57
- required this .textStyle ,
57
+ required this .ambientTextStyle ,
58
58
required this .nodes,
59
59
});
60
60
61
- final TextStyle textStyle ;
61
+ final TextStyle ambientTextStyle ;
62
62
final List <KatexNode > nodes;
63
63
64
64
@override
@@ -68,7 +68,7 @@ class KatexWidget extends StatelessWidget {
68
68
return Directionality (
69
69
textDirection: TextDirection .ltr,
70
70
child: DefaultTextStyle (
71
- style: mkBaseKatexTextStyle (textStyle ,
71
+ style: mkBaseKatexTextStyle (ambientTextStyle ,
72
72
ContentTheme .of (context).textStylePlainParagraph.color! ),
73
73
child: widget));
74
74
}
0 commit comments