buildCode method
Implementation
Widget buildCode() {
if (widget.selectable) {
return SelectableText.rich(
/* formatted text */
TextSpan(
style: TextStyle(fontFamily: 'monospace', fontSize: widget.fontSize),
children: <TextSpan>[
getSyntax(widget.syntax, widget.syntaxTheme).format(widget.code)
],
),
textScaleFactor: _fontScaleFactor,
);
} else {
return RichText(
textScaleFactor: _fontScaleFactor,
text: /* formatted text */ TextSpan(
style: TextStyle(fontFamily: 'monospace', fontSize: widget.fontSize),
children: <TextSpan>[
getSyntax(widget.syntax, widget.syntaxTheme).format(widget.code)
],
),
);
}
}