mirror of
https://github.com/rive-app/rive-flutter.git
synced 2025-06-23 07:18:17 +08:00
Adds solo support to flutter runtime.
Diffs= 011f9ab58 Adds solo support to flutter runtime. (#5068) d9952ae77 Fix clipping issue caused by wrong fillRule (#5067)
This commit is contained in:
@ -1 +1 @@
|
||||
2bc4acfbae514b00af797f08e28e35bad6fb76c3
|
||||
011f9ab5813d3a8159731d9eb11a70d1afb025d3
|
||||
|
10
CHANGELOG.md
10
CHANGELOG.md
@ -1,8 +1,12 @@
|
||||
## 0.10.4
|
||||
|
||||
- Support for Solos.
|
||||
|
||||
## 0.10.3
|
||||
|
||||
- Fixes animations with negative speed to play from the end with ping pong and one shot animations.
|
||||
- Update runtime to consider speed on animation states when playing state machines.
|
||||
- Fix edge case with spilled time, by clearing spilled time after an advance cycle.
|
||||
- Fixes animations with negative speed to play from the end with ping pong and one shot animations.
|
||||
- Update runtime to consider speed on animation states when playing state machines.
|
||||
- Fix edge case with spilled time, by clearing spilled time after an advance cycle.
|
||||
|
||||
## 0.10.2
|
||||
|
||||
|
@ -23,7 +23,7 @@ abstract class ContainerComponent extends ContainerComponentBase {
|
||||
|
||||
@mustCallSuper
|
||||
void childAdded(Component child) {
|
||||
_propagateCollapseToChildren(isCollapsed);
|
||||
propagateCollapseToChildren(isCollapsed);
|
||||
}
|
||||
|
||||
void childRemoved(Component child) {}
|
||||
@ -74,7 +74,8 @@ abstract class ContainerComponent extends ContainerComponentBase {
|
||||
}
|
||||
}
|
||||
|
||||
void _propagateCollapseToChildren(bool collapse) {
|
||||
@protected
|
||||
void propagateCollapseToChildren(bool collapse) {
|
||||
for (final child in children) {
|
||||
child.propagateCollapse(collapse);
|
||||
}
|
||||
@ -85,7 +86,7 @@ abstract class ContainerComponent extends ContainerComponentBase {
|
||||
if (!super.propagateCollapse(collapse)) {
|
||||
return false;
|
||||
}
|
||||
_propagateCollapseToChildren(collapse);
|
||||
propagateCollapseToChildren(collapse);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -18,29 +18,26 @@ class Solo extends SoloBase {
|
||||
}
|
||||
_activeComponent = value;
|
||||
activeComponentId = value?.id ?? Core.missingId;
|
||||
_updateCollapse();
|
||||
propagateCollapseToChildren(isCollapsed);
|
||||
}
|
||||
|
||||
void _updateCollapse() {
|
||||
@override
|
||||
void propagateCollapseToChildren(bool collapse) {
|
||||
for (final child in children) {
|
||||
if (child == _activeComponent) {
|
||||
child.propagateCollapse(false);
|
||||
} else {
|
||||
child.propagateCollapse(true);
|
||||
}
|
||||
child.propagateCollapse(collapse || child != _activeComponent);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void childRemoved(Component child) {
|
||||
super.childRemoved(child);
|
||||
_updateCollapse();
|
||||
propagateCollapseToChildren(isCollapsed);
|
||||
}
|
||||
|
||||
@override
|
||||
void childAdded(Component child) {
|
||||
super.childAdded(child);
|
||||
_updateCollapse();
|
||||
propagateCollapseToChildren(isCollapsed);
|
||||
}
|
||||
|
||||
@override
|
||||
@ -50,4 +47,10 @@ class Solo extends SoloBase {
|
||||
activeComponent = context.resolve(activeComponentId);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void onAdded() {
|
||||
super.onAdded();
|
||||
propagateCollapseToChildren(isCollapsed);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
name: rive
|
||||
version: 0.10.3
|
||||
version: 0.10.4
|
||||
homepage: https://rive.app
|
||||
description: Rive 2 Flutter Runtime. This package provides runtime functionality for playing back and interacting with animations built with the Rive editor available at https://rive.app.
|
||||
repository: https://github.com/rive-app/rive-flutter
|
||||
|
Reference in New Issue
Block a user