2.0.0-alpha.6
This release includes fixes and improvements and continues the API cleanup.
| Breaking changes | Addressed |
|---|---|
| Minor | #502, #518, #523, #535 |
The following fixes and improvements have been made:
- When
getXStepis specified, redundant GCD calculations are no longer performed. This improves performance and offers a solution when GCD calculation throws a false exception, which is possible due toFloatimprecision. - In the
viewsmodule, a problem where thelineColor,gradientTopColor, andgradientBottomColorattributes were handled incorrectly has been resolved. This resolves an issue where unexpected line colors and backgrounds were sometimes observed and had to be corrected via the attributes withpositiveandnegativeprefixes. - The
composemodule no longer depends onandroidx.compose.ui:ui-tooling.
DefaultValueFormatter and DefaultAxisValueFormatter have been removed. Despite their names, these were not the defaults—DecimalFormatValueFormatter and DecimalFormatAxisValueFormatter actually are. DefaultValueFormatter and DefaultAxisValueFormatter used toString, which is suboptimal for number formatting. Unless you were directly instantiating DefaultValueFormatter or DefaultAxisValueFormatter, no action is required. If you were, we suggest that you switch to DecimalFormatValueFormatter and DecimalFormatAxisValueFormatter, which produce better results and let you customize the pattern.
In the compose module, for consistency, horizontalGradient and verticalGradient are now DynamicShaders functions. Replace horizontalGradient(...) with DynamicShaders.horizontalGradient(...), and analogously for verticalGradient.
Utility APIs that Vico shouldn’t expose (such as Float#half) have been hidden. This reduces namespace pollution. Some of these APIs were unnecessarily marked with public, and some of them could’t be marked with internal because they were used across modules. In the latter case, we now use RestrictTo. If you need one of these APIs, copy the definition to your project. If you believe that an API shouldn’t have been hidden, please start a discussion.