Improving state machine api and including more examples.

This commit is contained in:
Luigi Rosso
2021-04-12 16:57:40 -07:00
parent 55d7996026
commit 2851203e67
15 changed files with 484 additions and 85 deletions

View File

@ -1,6 +1,8 @@
import 'package:flutter/material.dart';
import 'package:rive_example/example_animation.dart';
import 'package:rive_example/example_state_machine.dart';
import 'package:rive_example/little_machine.dart';
import 'package:rive_example/state_machine_skills.dart';
void main() => runApp(MaterialApp(
title: 'Navigation Basics',
@ -33,7 +35,7 @@ class Home extends StatelessWidget {
height: 10,
),
ElevatedButton(
child: const Text('State Machine'),
child: const Text('Button State Machine'),
onPressed: () {
Navigator.push(
context,
@ -43,6 +45,34 @@ class Home extends StatelessWidget {
);
},
),
const SizedBox(
height: 10,
),
ElevatedButton(
child: const Text('Skills Machine'),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute<void>(
builder: (context) => const StateMachineSkills(),
),
);
},
),
const SizedBox(
height: 10,
),
ElevatedButton(
child: const Text('Little Machine'),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute<void>(
builder: (context) => const LittleMachine(),
),
);
},
),
],
),
),