mirror of
https://github.com/rive-app/rive-flutter.git
synced 2025-06-30 11:48:20 +08:00
Adds one-shot animation controller
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rive_example/play_one_shot_animation.dart';
|
||||
import 'package:rive_example/play_pause_animation.dart';
|
||||
import 'package:rive_example/example_state_machine.dart';
|
||||
import 'package:rive_example/liquid_download.dart';
|
||||
@ -50,6 +51,20 @@ class Home extends StatelessWidget {
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
ElevatedButton(
|
||||
child: const Text('Play One-Shot Animation'),
|
||||
onPressed: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute<void>(
|
||||
builder: (context) => const PlayOneShotAnimation(),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
ElevatedButton(
|
||||
child: const Text('Button State Machine'),
|
||||
onPressed: () {
|
||||
|
Reference in New Issue
Block a user