Skip to content

Commit

Permalink
chore: enhanced examples
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecastrosales committed Jul 14, 2024
1 parent 54e9a8f commit 0fbddb8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
Binary file added assets/cute_robot.riv
Binary file not shown.
Binary file removed assets/soarus.riv
Binary file not shown.
31 changes: 20 additions & 11 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,32 @@ class Home extends StatelessWidget {

@override
Widget build(BuildContext context) {
return const Scaffold(
return Scaffold(
appBar: AppBar(
title: const Text('Flutter + Rive'),
actions: [
IconButton(
onPressed: () {
Navigator.of(context).pushReplacement(
MaterialPageRoute(
builder: (context) => const Splash(),
),
);
},
icon: const Icon(Icons.refresh),
),
],
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text(
'Flutter + Rive',
style: TextStyle(fontSize: 38),
textAlign: TextAlign.center,
),
SizedBox(
height: 120,
width: 120,
child: RiveAnimation.asset(
'assets/soarus.riv',
animations: ['idle'],
height: MediaQuery.sizeOf(context).width,
width: MediaQuery.sizeOf(context).width,
child: const RiveAnimation.asset(
'assets/cute_robot.riv',
),
),
],
Expand Down

0 comments on commit 0fbddb8

Please sign in to comment.