From 9553f9fb99145bfc97bdaceff2fa84a7a075e9cf Mon Sep 17 00:00:00 2001 From: Chris Bobbe Date: Fri, 5 Jan 2024 14:20:42 -0800 Subject: [PATCH] content [nfc]: Make paragraph text style `const` --- lib/widgets/content.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/widgets/content.dart b/lib/widgets/content.dart index 03d351005fa..b569f43b55b 100644 --- a/lib/widgets/content.dart +++ b/lib/widgets/content.dart @@ -100,7 +100,7 @@ class Paragraph extends StatelessWidget { final ParagraphNode node; - static TextStyle getTextStyle(BuildContext context) => const TextStyle( + static const textStyle = TextStyle( fontSize: kBaseFontSize, height: (17 / kBaseFontSize), ); @@ -113,7 +113,7 @@ class Paragraph extends StatelessWidget { final text = _buildBlockInlineContainer( node: node, - style: getTextStyle(context), + style: textStyle, ); // If the paragraph didn't actually have a `p` element in the HTML, @@ -646,7 +646,7 @@ class UserMention extends StatelessWidget { // One hopes an @-mention can't contain an embedded link. // (The parser on creating a UserMentionNode has a TODO to check that.) linkRecognizers: null, - style: Paragraph.getTextStyle(context), + style: Paragraph.textStyle, nodes: node.nodes)); }