Skip to content

Commit

Permalink
content: Set error{,Code}Style font size to kBaseFontSize, which is 17
Browse files Browse the repository at this point in the history
Before this, the text was sized by
Theme.of(context).textTheme.bodyMedium.fontSize, thanks to an
AnimatedDefaultTextStyle in the Material widget. That value is 14
when the app's localization state is set to render text as
"English-like" (see [Typography]), which at this point I think it
always is.
  • Loading branch information
chrisbobbe committed May 1, 2024
1 parent 1c0bde9 commit 56e8bbe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/widgets/content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1198,8 +1198,9 @@ InlineSpan _errorUnimplemented(UnimplementedNode node) {
}
}

const errorStyle = TextStyle(fontWeight: FontWeight.bold, color: Colors.red);
const errorStyle = TextStyle(
fontSize: kBaseFontSize, fontWeight: FontWeight.bold, color: Colors.red);

final errorCodeStyle = kMonospaceTextStyle
.merge(const TextStyle(color: Colors.red))
.merge(const TextStyle(fontSize: kBaseFontSize, color: Colors.red))
.merge(weightVariableTextStyle(null)); // TODO(a11y) pass a BuildContext

0 comments on commit 56e8bbe

Please sign in to comment.