- Updated internal color handling from
withOpacity()
towithValue(alpha)
to align with Flutter standards - Bump to latest
rive
, v0.13.20
- Added
advance()
method to update component colors during runtime animation - Optimized
draw()
method to update colors only when necessary using_needsColorUpdate
flag - Better handling of color updates during continuous animation rendering
This update improves performance and efficiency in color modifications during Rive animations playback.
- Added support for changing both linear and radial gradients with the introduction of the new widget: RiveGradientComponent. This change addresses issue #1: "Cannot change gradient color"
- Added documentation about the need to enable the "Export Options -> Export all names" setting in Rive when preparing files for use with this package (#3)
- Removed the override of didUnmountRenderObject method in RiveColorModifier to prevent framework exceptions during widget disposal (#4)
- Updated documentation to include information about exporting names from Rive files.
- Added information about limitations with name exporting in Rive files, particularly for Stroke and Fills elements intended for color changes (#2).
- Included a note about potential differences between Rive Pro and non-Pro accounts in terms of export capabilities and their impact on package functionality.
- The
shapeName
andfillName
properties inRiveColorComponent
have been replaced byshapePattern
,fillPattern
, andstrokePattern
. This update allows developers to use regular expressions to match shapes, fills, or strokes based on their names. - Existing code using
shapeName
andfillName
will need to be updated to use the new pattern-based properties.
- Added
shapePattern
,fillPattern
, andstrokePattern
properties to theRiveColorComponent
class. - These properties allow for more flexible matching using regular expressions.
RiveColorComponent(
shapePattern: '.*',
fillPattern: '.*primary',
strokePattern: '.*primary',
color: primaryColor,
),
- Then this component will match every fill or stroke that ends with "primary" in their names.
- Update Rive version constraints to "^0.13.1"
- Package documentation improvement
- You can find a simple demo in the "example" folder
-
RiveColorComponent
: Introduces a foundational class to manage and apply color properties within Rive animations. It allows for dynamic color manipulation directly within the Dart code, enhancing the flexibility and interactivity of Rive animations in Flutter apps. -
RiveColorModifier
: Provides a specialized class to modify and adjust color properties of Rive animations. It focuses on fine-tuned color alteration, enabling developers to implement detailed color transformations and effects on Rive objects. -
RiveCustomRenderObject
: Implements a custom render object for Rive animations, extending Flutter's RenderBox. This class is designed to offer a tailored rendering approach, accommodating specific or advanced rendering requirements for Rive animations. It allows for enhanced integration of Rive animations with Flutter's rendering engine, ensuring optimized performance and customization.