Fixes typo

This commit is contained in:
matt Sullivan
2021-06-14 16:07:22 -07:00
parent 941a2aa922
commit bf863bfa8d
2 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ class _PlayOneShotAnimationState extends State<PlayOneShotAnimation> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
_controller = OnShotAnimation( _controller = OneShotAnimation(
'bounce', 'bounce',
autoplay: false, autoplay: false,
onStop: () => setState(() => _isPlaying = false), onStop: () => setState(() => _isPlaying = false),

View File

@ -4,14 +4,14 @@ import 'package:flutter/widgets.dart';
import 'package:rive/src/controllers/simple_controller.dart'; import 'package:rive/src/controllers/simple_controller.dart';
/// Controller tailered for managing one-shot animations /// Controller tailered for managing one-shot animations
class OnShotAnimation extends SimpleAnimation { class OneShotAnimation extends SimpleAnimation {
/// Fires when the animation stops being active /// Fires when the animation stops being active
final VoidCallback? onStop; final VoidCallback? onStop;
/// Fires when the animation starts being active /// Fires when the animation starts being active
final VoidCallback? onStart; final VoidCallback? onStart;
OnShotAnimation( OneShotAnimation(
String animationName, { String animationName, {
double mix = 1, double mix = 1,
bool autoplay = true, bool autoplay = true,