mirror of
https://github.com/rive-app/rive-flutter.git
synced 2025-06-28 02:37:16 +08:00
Merge pull request #19 from simpleclub-extended/controller-de-activate-dispose
Add default noop implementations in RiveAnimationController
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
## [0.6.2+1] - 2020-11-?? ??:??:??
|
||||||
|
|
||||||
|
- Added default noop implementation to `onActivate`, `onDeactivate`, and `dispose`
|
||||||
|
in `RiveAnimationController`, which removes the need for noop overrides in subclasses
|
||||||
|
like `SimpleAnimation`.
|
||||||
|
|
||||||
## [0.6.2] - 2020-10-02 15:45:10
|
## [0.6.2] - 2020-10-02 15:45:10
|
||||||
|
|
||||||
- Exposed major and minor runtime version (issue #15) via riveVersion.
|
- Exposed major and minor runtime version (issue #15) via riveVersion.
|
||||||
|
@ -34,13 +34,4 @@ class SimpleAnimation extends RiveAnimationController<RuntimeArtboard> {
|
|||||||
isActive = false;
|
isActive = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void onActivate() {}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void onDeactivate() {}
|
|
||||||
}
|
}
|
||||||
|
@ -17,10 +17,10 @@ abstract class RiveAnimationController<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void onActivate();
|
void onActivate() {}
|
||||||
@protected
|
@protected
|
||||||
void onDeactivate();
|
void onDeactivate() {}
|
||||||
void apply(T core, double elapsedSeconds);
|
void apply(T core, double elapsedSeconds);
|
||||||
bool init(T core) => true;
|
bool init(T core) => true;
|
||||||
void dispose();
|
void dispose() {}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: rive
|
name: rive
|
||||||
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.
|
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.
|
||||||
version: 0.6.2
|
version: 0.6.2+1
|
||||||
repository: https://github.com/rive-app/rive-flutter
|
repository: https://github.com/rive-app/rive-flutter
|
||||||
homepage: https://rive.app
|
homepage: https://rive.app
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user