diff --git a/lib/rive.dart b/lib/rive.dart index 2c5ee87..b7920ce 100644 --- a/lib/rive.dart +++ b/lib/rive.dart @@ -22,4 +22,3 @@ export 'package:rive/src/rive_file.dart'; export 'package:rive/src/runtime_artboard.dart'; export 'package:rive/src/state_machine_controller.dart'; export 'package:rive/src/widgets/rive_animation.dart'; -export 'package:rive/src/widgets/rive_controller_animation.dart'; diff --git a/test/simple_animation_test.dart b/test/simple_animation_test.dart index 224789a..1031afe 100644 --- a/test/simple_animation_test.dart +++ b/test/simple_animation_test.dart @@ -33,4 +33,25 @@ void main() { expect(secondController.animationName, 'Animation 2'); expect(secondController.mix, 0.8); }); + + test('SimpleAnimation exposes autoplay', () { + final firstController = SimpleAnimation( + riveFile.mainArtboard.animations.first.name, + ); + // Autoplay defaults to true + expect(firstController.autoplay, isTrue); + // Controller should be active after being added to an artboard + riveFile.mainArtboard.addController(firstController); + expect(firstController.isActive, isTrue); + + final secondController = SimpleAnimation( + riveFile.mainArtboard.animations.first.name, + autoplay: false, + ); + // Autoplay defaults to true + expect(secondController.autoplay, isFalse); + // Controller should be inactive after being added to an artboard + riveFile.mainArtboard.addController(secondController); + expect(secondController.isActive, isFalse); + }); }