TextStyle has a new parameter to define whether it should scale to the system font size.
DynamicTypeController is a new class that handles both system-wide and app-specific font size category definition and changes. There is a shared instance available for default usage.
More advanced cases are enabled by setting the controller property of your TextStyle to a custom DynamicTypeController that you can customize independently of the default shared instance. This would allow a specific screen in your app to have it's own font size slider, for example.
This PR implements Dynamic Type support.
TextStyle
has a new parameter to define whether it should scale to the system font size.DynamicTypeController
is a new class that handles both system-wide and app-specific font size category definition and changes. There is a shared instance available for default usage.More advanced cases are enabled by setting the
controller
property of yourTextStyle
to a customDynamicTypeController
that you can customize independently of the default shared instance. This would allow a specific screen in your app to have it's own font size slider, for example.