Files
rive-flutter/example/lib/simple_animation_network.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

24 lines
658 B
Dart

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