Skip to content

Commit 8801f85

Browse files
committed
content [nfc]: Make paragraph text style const
1 parent b465e71 commit 8801f85

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
@@ -98,7 +98,7 @@ class Paragraph extends StatelessWidget {
9898

9999
final ParagraphNode node;
100100

101-
static TextStyle getTextStyle(BuildContext context) => const TextStyle(
101+
static const textStyle = TextStyle(
102102
fontSize: kBaseFontSize,
103103
height: (17 / kBaseFontSize),
104104
);
@@ -111,7 +111,7 @@ class Paragraph extends StatelessWidget {
111111

112112
final text = _buildBlockInlineContainer(
113113
node: node,
114-
style: getTextStyle(context),
114+
style: textStyle,
115115
);
116116

117117
// If the paragraph didn't actually have a `p` element in the HTML,
@@ -595,7 +595,7 @@ class UserMention extends StatelessWidget {
595595
// One hopes an @-mention can't contain an embedded link.
596596
// (The parser on creating a UserMentionNode has a TODO to check that.)
597597
linkRecognizers: null,
598-
style: Paragraph.getTextStyle(context),
598+
style: Paragraph.textStyle,
599599
nodes: node.nodes));
600600
}
601601

0 commit comments

Comments
 (0)