More documentation fixes re #132

This commit is contained in:
Luigi Rosso
2021-06-19 19:02:20 -07:00
parent ad622f12f1
commit 76c9c6decc
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,5 @@
## [0.7.20] - 2021-06-19 19:01:10
- Quick start fixes in README.md.
## [0.7.19] - 2021-06-18 12:00:00 ## [0.7.19] - 2021-06-18 12:00:00
- BREAKING CHANGE: onInit callback now takes an artboard as a parameter - BREAKING CHANGE: onInit callback now takes an artboard as a parameter
- Adds simple state machine example - Adds simple state machine example

View File

@ -8,7 +8,7 @@ Runtime docs are available in [Rive's help center](https://help.rive.app/runtime
```yaml ```yaml
dependencies: dependencies:
rive: ^0.7.19 rive: ^0.7.20
``` ```
## Quick Start ## Quick Start
@ -110,6 +110,10 @@ Play a one-shot animation repeatedly on demand
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:rive/rive.dart'; import 'package:rive/rive.dart';
void main() {
runApp(MaterialApp(home: PlayOneShotAnimation()));
}
class PlayOneShotAnimation extends StatefulWidget { class PlayOneShotAnimation extends StatefulWidget {
const PlayOneShotAnimation({Key? key}) : super(key: key); const PlayOneShotAnimation({Key? key}) : super(key: key);
@ -127,7 +131,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),