Skip to content

Commit d955039

Browse files
committed
content [nfc]: Name CodeBlockTextStyles's factory constructor "light"
We're about to add a "dark", for #749 / #95 dark theme.
1 parent 0399af6 commit d955039

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/widgets/code_block.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import 'text.dart';
99
/// Use [forSpan] for syntax highlighting.
1010
// TODO(#749) follow web for dark-theme colors
1111
class CodeBlockTextStyles {
12-
factory CodeBlockTextStyles(BuildContext context) {
12+
factory CodeBlockTextStyles.light(BuildContext context) {
1313
final bold = weightVariableTextStyle(context, wght: 700);
1414
return CodeBlockTextStyles._(
1515
plain: kMonospaceTextStyle

lib/widgets/content.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
4848
)
4949
.merge(weightVariableTextStyle(context))
5050
.copyWith(debugLabel: 'ContentTheme.textStylePlainParagraph'),
51-
codeBlockTextStyles = CodeBlockTextStyles(context),
51+
codeBlockTextStyles = CodeBlockTextStyles.light(context),
5252
textStyleError = const TextStyle(fontSize: kBaseFontSize, color: Colors.red)
5353
.merge(weightVariableTextStyle(context, wght: 700)),
5454
textStyleErrorCode = kMonospaceTextStyle

0 commit comments

Comments
 (0)