From ba74b94bc6aa5f4a5add5e037384875179f0f77b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Rodr=C3=ADguez?= Date: Tue, 26 Mar 2024 19:22:08 -0400 Subject: [PATCH] fix for users with custom font scale factor --- lib/flutter_linkify.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/flutter_linkify.dart b/lib/flutter_linkify.dart index 741fc05..2af0305 100644 --- a/lib/flutter_linkify.dart +++ b/lib/flutter_linkify.dart @@ -54,7 +54,7 @@ class Linkify extends StatelessWidget { final TextOverflow? overflow; /// The number of font pixels for each logical pixel - final double textScaleFactor; + final double? textScaleFactor; /// Whether the text should break at soft line breaks. final bool softWrap; @@ -88,7 +88,7 @@ class Linkify extends StatelessWidget { this.textDirection, this.maxLines, this.overflow = TextOverflow.clip, - this.textScaleFactor = 1.0, + this.textScaleFactor = null, this.softWrap = true, this.strutStyle, this.locale, @@ -138,7 +138,7 @@ class SelectableLinkify extends StatelessWidget { final String text; /// The number of font pixels for each logical pixel - final double textScaleFactor; + final double? textScaleFactor; /// Linkifiers to be used for linkify final List linkifiers; @@ -242,7 +242,7 @@ class SelectableLinkify extends StatelessWidget { this.maxLines, // SelectableText this.focusNode, - this.textScaleFactor = 1.0, + this.textScaleFactor = null, this.strutStyle, this.showCursor = false, this.autofocus = false,