@@ -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 ;
@@ -373,18 +374,14 @@ InlineSpan inlineCode(InlineCodeNode node) {
373374 // ]);
374375}
375376
376- const _kInlineCodeStyle = TextStyle (
377+ final _kInlineCodeStyle = kMonospaceTextStyle. merge ( const TextStyle (
377378 backgroundColor: Color (0xffeeeeee ),
378- fontSize: 0.825 * kBaseFontSize,
379- fontFamily: "Source Code Pro" , // TODO supply font
380- fontFamilyFallback: ["monospace" ]);
379+ fontSize: 0.825 * kBaseFontSize));
381380
382- const _kCodeBlockStyle = TextStyle (
381+ final _kCodeBlockStyle = kMonospaceTextStyle. merge ( const TextStyle (
383382 backgroundColor: Color .fromRGBO (255 , 255 , 255 , 1 ),
384383 fontSize: 0.825 * kBaseFontSize,
385- fontFamily: "Source Code Pro" , // TODO supply font
386- fontFamilyFallback: ["monospace" ],
387- );
384+ ));
388385
389386// const _kInlineCodeLeftBracket = '⸤';
390387// const _kInlineCodeRightBracket = '⸣';
@@ -641,8 +638,4 @@ InlineSpan _errorUnimplemented(UnimplementedNode node) {
641638
642639const errorStyle = TextStyle (fontWeight: FontWeight .bold, color: Colors .red);
643640
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