Fix deprecated Color API usage causing build failures (#4) - #11
Open
divyanshbhai wants to merge 12 commits into
Open
Fix deprecated Color API usage causing build failures (#4)#11divyanshbhai wants to merge 12 commits into
divyanshbhai wants to merge 12 commits into
Conversation
added 12 commits
October 15, 2025 18:33
- Replace deprecated r, g, b, a properties with red, green, blue, alpha - Fix toHex method to use integer values directly - Update swatch getter to use new color properties
- Fix shadowOutline method in VxAnimatedBox - Fix shadowOutline method in VxBox - Replace withValues(alpha: 0.5) with withOpacity(0.5)
- Replace withValues(alpha: 0.3) with withOpacity(0.3) in border color - Replace withValues(alpha: opacity!) with withOpacity(opacity!) in decoration - Replace withValues(alpha: 0.24) with withOpacity(0.24) in custom painter
- Replace color.r.toInt() with color.red - Replace color.g.toInt() with color.green - Replace color.b.toInt() with color.blue - Replace color.a.toInt() with color.alpha - Remove unnecessary toInt() calls as properties are already integers
- Replace baseColor.r.toInt() with baseColor.red - Replace baseColor.g.toInt() with baseColor.green - Replace baseColor.b.toInt() with baseColor.blue - Remove unnecessary toInt() calls as properties are already integers
- Replace CardThemeData with CardTheme as the type is deprecated - Update cardWidget method to use correct type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #4
This PR resolves build failures caused by deprecated Flutter Color API usage in VelocityX.
Changes Made:
r,g,b,awithred,green,blue,alphawithValues()withwithOpacity()CardThemeDatatoCardThemeFiles Modified:
lib/src/extensions/misc_ext.dartlib/src/flutter/animated/animated_container.dartlib/src/flutter/container.dartlib/src/flutter/glass.dartlib/src/velocity_xx.dartlib/src/flutter/velocityx_mixins/neu_mixin.dartlib/src/flutter/universal.dartTesting:
All deprecated API calls have been replaced with their current equivalents, maintaining full backward compatibility while ensuring builds work with newer Flutter versions.