@@ -51,6 +51,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
51
51
colorTableCellBorder: const HSLColor .fromAHSL (1 , 0 , 0 , 0.80 ).toColor (),
52
52
colorTableHeaderBackground: const HSLColor .fromAHSL (1 , 0 , 0 , 0.93 ).toColor (),
53
53
colorThematicBreak: const HSLColor .fromAHSL (1 , 0 , 0 , .87 ).toColor (),
54
+ colorLink: const HSLColor .fromAHSL (1 , 200 , 1 , 0.4 ).toColor (),
54
55
textStylePlainParagraph: _plainParagraphCommon (context).copyWith (
55
56
color: const HSLColor .fromAHSL (1 , 0 , 0 , 0.15 ).toColor (),
56
57
debugLabel: 'ContentTheme.textStylePlainParagraph' ),
@@ -84,6 +85,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
84
85
colorTableCellBorder: const HSLColor .fromAHSL (1 , 0 , 0 , 0.33 ).toColor (),
85
86
colorTableHeaderBackground: const HSLColor .fromAHSL (0.5 , 0 , 0 , 0 ).toColor (),
86
87
colorThematicBreak: const HSLColor .fromAHSL (1 , 0 , 0 , .87 ).toColor ().withValues (alpha: 0.2 ),
88
+ colorLink: const HSLColor .fromAHSL (1 , 200 , 1 , 0.4 ).toColor (), // the same as light in Web
87
89
textStylePlainParagraph: _plainParagraphCommon (context).copyWith (
88
90
color: const HSLColor .fromAHSL (1 , 0 , 0 , 0.85 ).toColor (),
89
91
debugLabel: 'ContentTheme.textStylePlainParagraph' ),
@@ -116,6 +118,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
116
118
required this .colorTableCellBorder,
117
119
required this .colorTableHeaderBackground,
118
120
required this .colorThematicBreak,
121
+ required this .colorLink,
119
122
required this .textStylePlainParagraph,
120
123
required this .textStyleEmoji,
121
124
required this .codeBlockTextStyles,
@@ -148,6 +151,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
148
151
final Color colorTableCellBorder;
149
152
final Color colorTableHeaderBackground;
150
153
final Color colorThematicBreak;
154
+ final Color colorLink;
151
155
152
156
/// The complete [TextStyle] we use for plain, unstyled paragraphs.
153
157
///
@@ -208,6 +212,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
208
212
Color ? colorTableCellBorder,
209
213
Color ? colorTableHeaderBackground,
210
214
Color ? colorThematicBreak,
215
+ Color ? colorLink,
211
216
TextStyle ? textStylePlainParagraph,
212
217
TextStyle ? textStyleEmoji,
213
218
CodeBlockTextStyles ? codeBlockTextStyles,
@@ -230,6 +235,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
230
235
colorTableCellBorder: colorTableCellBorder ?? this .colorTableCellBorder,
231
236
colorTableHeaderBackground: colorTableHeaderBackground ?? this .colorTableHeaderBackground,
232
237
colorThematicBreak: colorThematicBreak ?? this .colorThematicBreak,
238
+ colorLink: colorLink ?? this .colorLink,
233
239
textStylePlainParagraph: textStylePlainParagraph ?? this .textStylePlainParagraph,
234
240
textStyleEmoji: textStyleEmoji ?? this .textStyleEmoji,
235
241
codeBlockTextStyles: codeBlockTextStyles ?? this .codeBlockTextStyles,
@@ -259,6 +265,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
259
265
colorTableCellBorder: Color .lerp (colorTableCellBorder, other.colorTableCellBorder, t)! ,
260
266
colorTableHeaderBackground: Color .lerp (colorTableHeaderBackground, other.colorTableHeaderBackground, t)! ,
261
267
colorThematicBreak: Color .lerp (colorThematicBreak, other.colorThematicBreak, t)! ,
268
+ colorLink: Color .lerp (colorLink, other.colorLink, t)! ,
262
269
textStylePlainParagraph: TextStyle .lerp (textStylePlainParagraph, other.textStylePlainParagraph, t)! ,
263
270
textStyleEmoji: TextStyle .lerp (textStyleEmoji, other.textStyleEmoji, t)! ,
264
271
codeBlockTextStyles: CodeBlockTextStyles .lerp (codeBlockTextStyles, other.codeBlockTextStyles, t),
@@ -1030,7 +1037,7 @@ class _InlineContentBuilder {
1030
1037
_pushRecognizer (recognizer);
1031
1038
final result = _buildNodes (node.nodes,
1032
1039
// Web has the same color in light and dark mode.
1033
- style: TextStyle (color: const HSLColor . fromAHSL ( 1 , 200 , 1 , 0.4 ). toColor () ));
1040
+ style: TextStyle (color: ContentTheme . of (_context ! ).colorLink ));
1034
1041
_popRecognizer ();
1035
1042
return result;
1036
1043
0 commit comments