Files
rive-flutter/example/lib/simple_animation.dart
luigi-rosso 6395bceaf7 Joystick ordering
Fixes issue with dependencies discussed here:
https://github.com/rive-app/rive/pull/5275

Joysticks now build their own DAG and export in the correct order for runtime.

Diffs=
f2ecb824b Joystick ordering (#5277)
2023-05-23 05:23:17 +00:00

23 lines
565 B
Dart

import 'package:flutter/material.dart';
import 'package:rive/rive.dart';
/// Basic example playing a Rive animation from a packaged asset.
class SimpleAssetAnimation extends StatelessWidget {
const SimpleAssetAnimation({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Simple Animation'),
),
body: const Center(
child: RiveAnimation.asset(
'assets/off_road_car.riv',
fit: BoxFit.cover,
),
),
);
}
}