Allow for individual scale factor in a group
I am having a problem were I am using two different font families that I would like to automatically resize together, so I put them both in the same group. However, one of the fonts looks smaller than the other, using the same font size.
I would like to be able to set a scale factor for one that wouldn't affect the other. Both of them would still resize at the same time but they would always maintain the same ratio.
I tried using textScaleFactor, however this doesn't seem to be independent: the second widget seems to use the same textScaleFactor as the first.
If I modify the build function of _AutoSizeTextState like this:
if (widget.group != null) {
widget.group._updateFontSize(this, fontSize / widget.factor);
text =
_buildText(widget.group._fontSize * widget.factor, style, maxLines);
}
(adding factor in the constructor), it does exactly what I want. I could work on a PR but I imagine that this overlaps with the expected functionality of textScaleFactor. Should it be changed or should a new parameter be added (if you think this is useful)?
I decided to create a new parameter groupScaleFactor as textScaleFactor seems to be linked to accessibility.