baseStyleFor method

  1. @override
TextStyle baseStyleFor(
  1. String? language,
  2. TextStyle fallback
)
override

The base style for language's code, derived from fallback (the code block's monospace style). Used to apply the theme's default foreground so untokenized code stays legible on the theme background.

Implementation

@override
TextStyle baseStyleFor(String? language, TextStyle fallback) =>
    theme.foreground == null
        ? fallback
        : fallback.copyWith(color: theme.foreground);