animate_icons 0.0.3 animate_icons: ^0.0.3 copied to clipboard
This is a plugin with the help of which you can animate between any two icons like we do in AnimatedIcon widget given to us by default. We have a very few options to us with the default AnimatedIcons [...]
import 'package:animate_icons/animate_icons.dart';
import 'package:flutter/material.dart';
void main() => runApp(MaterialApp(home: MyApp()));
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: AnimateIcons(
startIcon: Icons.bluetooth,
endIcon: Icons.bluetooth_disabled,
size: 60.0,
onEndIconPress: () {
print("Clicked on End Icon");
},
onStartIconPress: () {
print("Clicked on Start Icon");
},
duration: Duration(milliseconds: 600),
clockwise: true,
color: Colors.deepPurple,
),
),
);
}
}