animate_on_hover 1.0.2 animate_on_hover: ^1.0.2 copied to clipboard
Add animation(s) to your widgets on web when hovered, using this package.
import 'package:animate_on_hover/animate_on_hover.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Animate on hover example',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const HomeScreen());
}
}
class HomeScreen extends StatelessWidget {
const HomeScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Container(
height: 75,
width: 100,
decoration: BoxDecoration(
color: Colors.red,
borderRadius: BorderRadius.circular(5),
),
).increaseSizeOnHover(1.5),
),
);
}
}