From 11375751d02334251eb37cbe867fa2eaeca55279 Mon Sep 17 00:00:00 2001 From: Erick Zanardo Date: Sat, 30 May 2020 15:18:16 -0300 Subject: [PATCH] renaming play to playing on AnimationWidget --- doc/examples/widgets/lib/main.dart | 2 +- doc/widgets.md | 2 +- lib/widgets/animation_widget.dart | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/examples/widgets/lib/main.dart b/doc/examples/widgets/lib/main.dart index b76594fc5..2cad698f5 100644 --- a/doc/examples/widgets/lib/main.dart +++ b/doc/examples/widgets/lib/main.dart @@ -131,7 +131,7 @@ void main() async { height: ctx.numberProperty('container height', 200), child: AnimationWidget( animation: _animation, - play: ctx.boolProperty('playing', true), + playing: ctx.boolProperty('playing', true), anchor: parseAnchor( ctx.listProperty('anchor', 'Anchor.center', anchorOptions)), ), diff --git a/doc/widgets.md b/doc/widgets.md index 0357260a4..848314a09 100644 --- a/doc/widgets.md +++ b/doc/widgets.md @@ -71,7 +71,7 @@ How to use it: ```dart AnimationWidget( animation: _animation, - play: true, + playing: true, center: true, ), ``` diff --git a/lib/widgets/animation_widget.dart b/lib/widgets/animation_widget.dart index 14cec31fd..b9fe86221 100644 --- a/lib/widgets/animation_widget.dart +++ b/lib/widgets/animation_widget.dart @@ -9,11 +9,11 @@ import 'dart:math'; class AnimationWidget extends StatefulWidget { final Animation animation; final Anchor anchor; - final bool play; + final bool playing; AnimationWidget({ this.animation, - this.play = true, + this.playing = true, this.anchor = Anchor.topLeft, }) : assert(animation.loaded(), 'Animation must be loaded'); @@ -29,7 +29,7 @@ class _AnimationWidget extends State @override void didUpdateWidget(oldWidget) { super.didUpdateWidget(oldWidget); - if (widget.play) { + if (widget.playing) { _initAnimation(); } else { _pauseAnimation(); @@ -54,7 +54,7 @@ class _AnimationWidget extends State widget.animation.onCompleteAnimation = _pauseAnimation; - if (widget.play) { + if (widget.playing) { _initAnimation(); } }