Files
rive-flutter/example/lib/simple_animation.dart
HayesGordon 0767844a56 style: updated example and readme
Diffs=
a259b57b2 style: clean up example app
483978f10 docs: update readme
2023-01-11 21:04:30 +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,
),
),
);
}
}