@@ -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 ;
@@ -371,18 +372,14 @@ InlineSpan inlineCode(InlineCodeNode node) {
371
372
// ]);
372
373
}
373
374
374
- const _kInlineCodeStyle = TextStyle (
375
+ final _kInlineCodeStyle = kMonospaceTextStyle. merge ( const TextStyle (
375
376
backgroundColor: Color (0xffeeeeee ),
376
- fontSize: 0.825 * kBaseFontSize,
377
- fontFamily: "Source Code Pro" , // TODO supply font
378
- fontFamilyFallback: ["monospace" ]);
377
+ fontSize: 0.825 * kBaseFontSize));
379
378
380
- const _kCodeBlockStyle = TextStyle (
379
+ final _kCodeBlockStyle = kMonospaceTextStyle. merge ( const TextStyle (
381
380
backgroundColor: Color .fromRGBO (255 , 255 , 255 , 1 ),
382
381
fontSize: 0.825 * kBaseFontSize,
383
- fontFamily: "Source Code Pro" , // TODO supply font
384
- fontFamilyFallback: ["monospace" ],
385
- );
382
+ ));
386
383
387
384
// const _kInlineCodeLeftBracket = '⸤';
388
385
// const _kInlineCodeRightBracket = '⸣';
@@ -639,8 +636,4 @@ InlineSpan _errorUnimplemented(UnimplementedNode node) {
639
636
640
637
const errorStyle = TextStyle (fontWeight: FontWeight .bold, color: Colors .red);
641
638
642
- const errorCodeStyle = TextStyle (
643
- color: Colors .red,
644
- fontFamily: "Source Code Pro" , // TODO supply font
645
- fontFamilyFallback: ["monospace" ],
646
- );
639
+ final errorCodeStyle = kMonospaceTextStyle.merge (const TextStyle (color: Colors .red));
0 commit comments