@@ -7,6 +7,7 @@ import '../model/content.dart';
7
7
import '../model/store.dart' ;
8
8
import 'store.dart' ;
9
9
import 'lightbox.dart' ;
10
+ import 'text.dart' ;
10
11
11
12
/// The font size for message content in a plain unstyled paragraph.
12
13
const double kBaseFontSize = 14 ;
@@ -373,18 +374,14 @@ InlineSpan inlineCode(InlineCodeNode node) {
373
374
// ]);
374
375
}
375
376
376
- const _kInlineCodeStyle = TextStyle (
377
+ final _kInlineCodeStyle = kMonospaceTextStyle. merge ( const TextStyle (
377
378
backgroundColor: Color (0xffeeeeee ),
378
- fontSize: 0.825 * kBaseFontSize,
379
- fontFamily: "Source Code Pro" , // TODO supply font
380
- fontFamilyFallback: ["monospace" ]);
379
+ fontSize: 0.825 * kBaseFontSize));
381
380
382
- const _kCodeBlockStyle = TextStyle (
381
+ final _kCodeBlockStyle = kMonospaceTextStyle. merge ( const TextStyle (
383
382
backgroundColor: Color .fromRGBO (255 , 255 , 255 , 1 ),
384
383
fontSize: 0.825 * kBaseFontSize,
385
- fontFamily: "Source Code Pro" , // TODO supply font
386
- fontFamilyFallback: ["monospace" ],
387
- );
384
+ ));
388
385
389
386
// const _kInlineCodeLeftBracket = '⸤';
390
387
// const _kInlineCodeRightBracket = '⸣';
@@ -641,8 +638,4 @@ InlineSpan _errorUnimplemented(UnimplementedNode node) {
641
638
642
639
const errorStyle = TextStyle (fontWeight: FontWeight .bold, color: Colors .red);
643
640
644
- const errorCodeStyle = TextStyle (
645
- color: Colors .red,
646
- fontFamily: "Source Code Pro" , // TODO supply font
647
- fontFamilyFallback: ["monospace" ],
648
- );
641
+ final errorCodeStyle = kMonospaceTextStyle.merge (const TextStyle (color: Colors .red));
0 commit comments