mirror of
https://github.com/rive-app/rive-flutter.git
synced 2025-06-26 17:56:28 +08:00
Fixes missing asset in example
This commit is contained in:
@ -41,7 +41,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||||||
|
|
||||||
// Load the animation file from the bundle, note that you could also
|
// Load the animation file from the bundle, note that you could also
|
||||||
// download this. The RiveFile just expects a list of bytes.
|
// download this. The RiveFile just expects a list of bytes.
|
||||||
rootBundle.load('assets/animation_playground.riv').then(
|
rootBundle.load('assets/off_road_car.riv').then(
|
||||||
(data) async {
|
(data) async {
|
||||||
final file = RiveFile();
|
final file = RiveFile();
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||||||
final artboard = file.mainArtboard;
|
final artboard = file.mainArtboard;
|
||||||
// Add a controller to play back a known animation on the main/default
|
// Add a controller to play back a known animation on the main/default
|
||||||
// artboard.We store a reference to it so we can toggle playback.
|
// artboard.We store a reference to it so we can toggle playback.
|
||||||
artboard.addController(_controller = SimpleAnimation('Untitled 1'));
|
artboard.addController(_controller = SimpleAnimation('idle'));
|
||||||
setState(() => _riveArtboard = artboard);
|
setState(() => _riveArtboard = artboard);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user