@@ -7,6 +7,7 @@ import '../model/content.dart';
77import '../model/store.dart' ;
88import 'store.dart' ;
99import 'lightbox.dart' ;
10+ import 'text.dart' ;
1011
1112/// The font size for message content in a plain unstyled paragraph.
1213const double kBaseFontSize = 14 ;
@@ -371,18 +372,14 @@ InlineSpan inlineCode(InlineCodeNode node) {
371372 // ]);
372373}
373374
374- const _kInlineCodeStyle = TextStyle (
375+ final _kInlineCodeStyle = kMonospaceTextStyle. merge ( const TextStyle (
375376 backgroundColor: Color (0xffeeeeee ),
376- fontSize: 0.825 * kBaseFontSize,
377- fontFamily: "Source Code Pro" , // TODO supply font
378- fontFamilyFallback: ["monospace" ]);
377+ fontSize: 0.825 * kBaseFontSize));
379378
380- const _kCodeBlockStyle = TextStyle (
379+ final _kCodeBlockStyle = kMonospaceTextStyle. merge ( const TextStyle (
381380 backgroundColor: Color .fromRGBO (255 , 255 , 255 , 1 ),
382381 fontSize: 0.825 * kBaseFontSize,
383- fontFamily: "Source Code Pro" , // TODO supply font
384- fontFamilyFallback: ["monospace" ],
385- );
382+ ));
386383
387384// const _kInlineCodeLeftBracket = '⸤';
388385// const _kInlineCodeRightBracket = '⸣';
@@ -639,8 +636,4 @@ InlineSpan _errorUnimplemented(UnimplementedNode node) {
639636
640637const errorStyle = TextStyle (fontWeight: FontWeight .bold, color: Colors .red);
641638
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