click_rive_animation 0.1.0-alpha click_rive_animation: ^0.1.0-alpha copied to clipboard
Flutter package for clicking animation with the help of rive animation
import 'package:click_rive_animation/click_rive_animation.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(),
);
}
}
class MyHomePage extends StatelessWidget {
const MyHomePage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return const Scaffold(
backgroundColor: Colors.black,
body: ClickRiveAnimation.asset(
"assets/ripple.riv",
animationName: "click_ripple",
width: 150,
height: 150,
child: SizedBox(),
),
);
}
}