Last updated:
0 purchases
animation kh
Animation Kh library #
Animation Kh make your application have animation looking smoothly and beautifully.
This is a animation library for Flutter that provides animation on widget and list that you can use in your app.
Animation Kh is opensource library developed by Vann Dev
[Demo]
Installation #
Add the latest version of package to your pubspec.yaml (and rundart pub get):
dependencies:
animation_kh: ^0.0.1
copied to clipboard
Import the package and use it in your Flutter App.
import 'package:animation_kh/animation_kh.dart';
copied to clipboard
Example #
For example, create animation on widget
class MyClass extends StatefulWidget {
const MyClass({Key? key}) : super(key: key);
@override
State<MyClass> createState() => _MyClassState();
}
class _MyClassState extends State<MyClass> with TickerProviderStateMixin {
AnimationController? animationController;
@override
void initState() {
super.initState();
animationController = AnimationController(
vsync: this,
duration: const Duration(milliseconds: 500),
);
}
@override
Widget build(BuildContext context) {
return Column(
children: [
/// animation on title or text widget
AnimationKh(
animationController: animationController,
slideDirection: SlideDirection.fromRight,
child: Text("Hello world"),
),
/// animation on icon widget
AnimationKh(
animationController: animationController,
slideDirection: SlideDirection.fromRight,
child: Padding(
padding: const EdgeInsets.only(right: 12),
child: CircleAvatar(
backgroundColor: Theme.of(context).colorFF2A2(context),
child: IconButton(
padding: const EdgeInsets.all(0),
onPressed: () {},
icon: Icon(Icons.favorite),
),
),
),
),
],
);
}
}
copied to clipboard
Example #
For example, create animation on list
class MyClass extends StatefulWidget {
const MyClass({Key? key}) : super(key: key);
@override
State<MyClass> createState() => _MyClassState();
}
class _MyClassState extends State<MyClass> with TickerProviderStateMixin {
AnimationController? animationController;
@override
void initState() {
super.initState();
animationController = AnimationController(
vsync: this,
duration: const Duration(milliseconds: 500),
);
}
@override
Widget build(BuildContext context) {
return ListView(
children: List.generate(
10,
(index) => AnimationKh(
animationController: animationController,
position: index,
slideDirection: SlideDirection.fromBottom,
itemCount: 10,
child: ListTile(
leading: const Icon(Icons.home),
title: Text(index.toString()),
),
),
),
);
}
}
copied to clipboard
LICENSE #
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.