Merge pull request #19 from simpleclub-extended/controller-de-activate-dispose

Add default noop implementations in RiveAnimationController
This commit is contained in:
Matt Sullivan
2020-11-10 21:08:59 -05:00
committed by GitHub
4 changed files with 10 additions and 13 deletions

View File

@ -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.

View File

@ -34,13 +34,4 @@ class SimpleAnimation extends RiveAnimationController<RuntimeArtboard> {
isActive = false; isActive = false;
} }
} }
@override
void dispose() {}
@override
void onActivate() {}
@override
void onDeactivate() {}
} }

View File

@ -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() {}
} }

View File

@ -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