.riv, Use it when loading animation isRive Flutter runtimeRive:https://github.com/rive-app/rive-flutter
rive 0.7.9:https://pub.dev/packages/rive
Open the CMD terminal, execute the following instructions (automatically add Pubspec.yaml dependence)
flutter pub add rive
Open the CMD terminal, perform the following instructions (Pubspec.yaml delete)
flutter pub remove rive
https://rive.app/community/

On the material page, select the material to enter the details page, select the right sideOpen in Preview Playerturn on

View available animation (as shown in Figure: Walk, Hit, IN)

Return to the material details page for download (the downloaded file name is205-467-zombie-character.rivRenamedzombie.riv)

assets:
- images/
- assets/
class _MyHomePageState extends State<MyHomePage>
{
//rive
Artboard _riveArtboard;
RiveAnimationController _controller;
bool get isPlaying => _controller?.isActive ?? false;
@override
void initState() {
super.initState();
rootBundle.load("assets/zombie.riv").then((value) async {
final file = RiveFile.import(value);
final artboard = file.mainArtboard;
artboard.addController(_controller = SimpleAnimation('idle'));
setState(() => _riveArtboard = artboard);
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: Column(
children: [
Flexible(child: _riveArtboard == null ? Container(color: Colors.blue,) : Rive(artboard:_riveArtboard, alignment:Alignment.center, fit:BoxFit.contain, )),
Column(
mainAxisAlignment:MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
RaisedButton(child: Text("Walk"),onPressed: (){setState(() { _riveArtboard.addController(_controller = SimpleAnimation('Walk'));});}),
RaisedButton(child: Text("Hit"),onPressed: (){setState(() { _riveArtboard.addController(_controller = SimpleAnimation('Hit'));});}),
RaisedButton(child: Text("In"),onPressed: (){setState(() {_riveArtboard.addController(_controller = SimpleAnimation('In'));});})
],)
],
),
floatingActionButton: FloatingActionButton(
onPressed: _togglePlay,
tooltip: isPlaying ? 'Pause' : 'Play',
child: Icon(
isPlaying ? Icons.pause : Icons.play_arrow,
),
)
);
}
void _togglePlay() {
setState(() => _controller.isActive = !_controller.isActive);
}
}

I. Overview Tween animation, also called complement animation Tween has two keyframes, begin start frames, end frames, and complement-up frames in Begin and END completed animation effects Common Twee...
I. Overview The TWEEN animation controller can perform the corresponding animation effect based on the interval value. Control the start of the animation, stop, you can also get the operation status o...
I. Overview Lottie is an ARIBNB open source for high-performance animation library for Android, iOS, etc. The flutter native bank does not support Lottie, but the animation effect of Lottie can be imp...
I. Overview NIMA is a 2D vector animation tool for Skia-rendering NIMA's use operation is basically the same as Flare NIMA file decompression is included.nma.bytesFile and.pngImage file, specified whe...
Introduction inFlutter Animation animation development-the simplest animation introductionIn this article we introduced the simplest animation development process Today we add an animation curve on th...
In the following code, we have implemented an animation that changes the width and height of the green square from 100 to 500 within 5 seconds. to sum up: Create AnimationController and set the durati...
1. Which types of animation 2. Add animation 3. Add a monitor to animation 4.AnImatedWidget and AnimatedBuilder 5. Hero animation 1. Which types of animation About two categories: Tween -based and phy...
We know that AnimationController.forward () can play animation in forward direction, if you want to play animation in reverse, you can call AnimationController.reverse () Step on the pit Immediately w...
Introduction We know that AnimationController.forward () can play the animation in the forward direction, and AnimationController.reverse () can play the animation in the reverse direction. If you wan...
I. Overview Hero animation is also called transition animation Excessive animation: When the user clicks on a picture, switch to another page, this page also has this picture. Di Hero 2.1 Constructor ...