Skip to content

Commit

Permalink
implemented fix from ninoreiter: customized textScaleFactor causes ju…
Browse files Browse the repository at this point in the history
…mping text MarcelGarus#93
  • Loading branch information
Mücke authored and Mücke committed Apr 21, 2024
1 parent 0e47b2c commit e2c7690
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/marquee.dart
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,10 @@ class _MarqueeState extends State<Marquee> with SingleTickerProviderStateMixin {

final constraints = BoxConstraints(maxWidth: double.infinity);

final richTextWidget = Text.rich(span).build(context) as RichText;
final richTextWidget = Text.rich(
span,
textScaler: TextScaler.linear(widget.textScaleFactor),
).build(context) as RichText;
final renderObject = richTextWidget.createRenderObject(context);
renderObject.layout(constraints);

Expand Down

0 comments on commit e2c7690

Please sign in to comment.