Files
rive-flutter/example/lib/hit_events.dart
2022-03-28 20:50:23 -07:00

23 lines
523 B
Dart

import 'package:flutter/material.dart';
import 'package:rive/rive.dart';
class HitEventExample extends StatelessWidget {
const HitEventExample({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Hit Events'),
),
body: const Center(
child: RiveAnimation.asset(
'assets/cannon.riv',
fit: BoxFit.cover,
stateMachines: ['State Machine 1'],
),
),
);
}
}