animation_button 0.0.2
animation_button: ^0.0.2 copied to clipboard
The button_animations is a package to make highly customizable button with highlight animations in background .
import 'package:flutter/material.dart';
import 'package:animation_button/animation_button.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
showSemanticsDebugger: false,
title: 'Flutter Demo for Animated Button',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: const MyHomePage(title: 'Flutter Demo '),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: AnimationButton(
animatedContainerDuration: const Duration(milliseconds: 300),
onPressed: () {
debugPrint('AppBarTitle ${widget.title}');
},
title: 'Subscribe now',
)),
);
}
}