Skip to main content

2.0.0-alpha.6

This release includes fixes and improvements and continues the API cleanup.

Breaking changesAddressed
Minor#502, #518, #523, #535

The following fixes and improvements have been made:

  • When getXStep is 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 to Float imprecision.
  • In the views module, a problem where the lineColor, gradientTopColor, and gradientBottomColor attributes 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 with positive and negative prefixes.
  • The compose module no longer depends on androidx.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.