The non-obvious mistake being that the AutoSizeGroup will keep being reconstructed any time the widget rebuilds, and lose its state, which can cause flickering and performance issues.
The addition of a standard AutoSizeGroupBuilder to capture the AutoSizeGroup in its own stateful widget would make it much simpler to use it correctly, like:
Every time someone is new to
AutoSizeText
, they initially make this mistake:The non-obvious mistake being that the AutoSizeGroup will keep being reconstructed any time the widget rebuilds, and lose its state, which can cause flickering and performance issues.
The addition of a standard AutoSizeGroupBuilder to capture the AutoSizeGroup in its own stateful widget would make it much simpler to use it correctly, like: