Skip to content

Commit 9553f9f

Browse files
committed
content [nfc]: Make paragraph text style const
1 parent acc2903 commit 9553f9f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/widgets/content.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class Paragraph extends StatelessWidget {
100100

101101
final ParagraphNode node;
102102

103-
static TextStyle getTextStyle(BuildContext context) => const TextStyle(
103+
static const textStyle = TextStyle(
104104
fontSize: kBaseFontSize,
105105
height: (17 / kBaseFontSize),
106106
);
@@ -113,7 +113,7 @@ class Paragraph extends StatelessWidget {
113113

114114
final text = _buildBlockInlineContainer(
115115
node: node,
116-
style: getTextStyle(context),
116+
style: textStyle,
117117
);
118118

119119
// If the paragraph didn't actually have a `p` element in the HTML,
@@ -646,7 +646,7 @@ class UserMention extends StatelessWidget {
646646
// One hopes an @-mention can't contain an embedded link.
647647
// (The parser on creating a UserMentionNode has a TODO to check that.)
648648
linkRecognizers: null,
649-
style: Paragraph.getTextStyle(context),
649+
style: Paragraph.textStyle,
650650
nodes: node.nodes));
651651
}
652652

0 commit comments

Comments
 (0)