cool_animation_flutter 0.0.4
cool_animation_flutter: ^0.0.4 copied to clipboard
A Flutter package for easy and concise animations. Supports direction, delay, sequential animations, and visibility-based triggers.
cool_animation_flutter β¨
|
|
|
πΊπΈ English #
A Flutter package that helps you apply cool animations very easily and concisely.
No more complex AnimationController and StatefulWidget setups; just wrap your widgets to implement smooth and natural interactions.
From simple appearance effects to advanced sequential list animations, create the coolest UX with the least code.
β¨ Key Features #
- Effortless Implementation: Smooth animations with just a few lines of code.
- Scroll-Triggered: Automatically start animations when widgets enter the viewport (
triggerOnVisible). - Sequential Animations: Easily create staggered entry effects for lists or groups.
- Highly Customizable: Fine-tune duration, delay, curves, and offsets.
- π Expanding Library: More than 10+ cool interactions will be added soon.
π¦ Installation #
Add this to your pubspec.yaml:
dependencies:
cool_animation_flutter: ^0.0.4
π¬ Animation #
1οΈβ£ SlideFadeIn
Smoothly slides and fades in from any direction. Perfect for page transitions or list items.
SlideFadeIn(
direction: SlideDirection.fromBottom,
duration: Duration(milliseconds: 600),
child: MyCard(),
)
2οΈβ£ ScaleBounce
Scale up animation with an elastic bounce effect. Great for highlighting buttons or success icons.
ScaleBounce(
initialScale: 0.5,
peakScale: 1.2,
duration: Duration(milliseconds: 800),
child: SuccessIcon(),
)
π Utilities #
Sequential Animations (Staggered Animation)
Create staggered entries without manual calculations.
Column(
children: buildSequentialAnimations(
children: [Item1, Item2, Item3],
builder: (child, delay) => SlideFadeIn(delay: delay, child: child),
),
)
π Reference #
SlideDirection (for SlideFadeIn)
fromBottom,fromTop,fromLeft,fromRight(+ Diagonals)none(Fade only)
π°π· νκ΅μ΄ #
Flutterμμ λ©μ§ μ λλ©μ΄μ
μ μμ£Ό μ½κ³ κ°κ²°νκ² μ μ©ν μ μλλ‘ λμμ£Όλ ν¨ν€μ§μ
λλ€.
볡μ‘ν AnimationControllerμ StatefulWidgetμ λ§€λ² λ§λ€ νμ μμ΄, μμ ―μ κ°μΈλ κ²λ§μΌλ‘ λΆλλ½κ³ μμ°μ€λ¬μ΄ μΈν°λμ
μ ꡬνν μ μμ΅λλ€.
λ¨μν λ±μ₯ ν¨κ³ΌλΆν° 리μ€νΈκ° μμ°¨μ μΌλ‘ μ¬λΌμ€λ κ³ κΈ μ°μΆκΉμ§, κ°μ₯ μ μ μ½λλ‘ κ°μ₯ λ©μ§ UXλ₯Ό λ§λ€μ΄λ³΄μΈμ.
β¨ μ£Όμ κΈ°λ₯ #
- κ°νΈν ꡬν: λ¨ λͺ μ€μ μ½λλ‘ κ΅¬νλλ λΆλλ¬μ΄ μ λλ©μ΄μ .
- μ€ν¬λ‘€ νΈλ¦¬κ±°: μμ ―μ΄ νλ©΄μ λ€μ΄μ¬ λ μλμΌλ‘ μ¬μ (
triggerOnVisible). - μμ°¨ μ λλ©μ΄μ : 리μ€νΈλ κ·Έλ£Ή μμλ€μ΄ μκ° μ°¨λ₯Ό λκ³ λνλλ ν¨κ³Όλ₯Ό μ½κ² ꡬν.
- λμ 컀μ€ν μ±: μ§μ μκ°, μ§μ° μκ°, 곑μ (Curve), μ€νμ λ±μ μμ λ‘κ² μ‘°μ .
- π λΌμ΄λΈλ¬λ¦¬ νμ₯: κ³§ 10κ° μ΄μμ λ©μ§ μΈν°λμ μ΄ μΆκ°λ μμ μ λλ€.
π¦ μ€μΉ λ°©λ² #
pubspec.yaml νμΌμ λ€μμ μΆκ°νμΈμ:
dependencies:
cool_animation_flutter: ^0.0.4
π¬ μ λλ©μ΄μ #
1οΈβ£ SlideFadeIn
μ΄λ€ λ°©ν₯μμλ λΆλλ½κ² λ―Έλλ¬μ§λ©° λ±μ₯ν©λλ€. νμ΄μ§ μ νμ΄λ 리μ€νΈ νλͺ© λ±μ₯μ μ ν©ν©λλ€.
SlideFadeIn(
direction: SlideDirection.fromBottom,
duration: Duration(milliseconds: 600),
child: MyCard(),
)
2οΈβ£ ScaleBounce
λ°μ΄μ€ ν¨κ³Όμ ν¨κ» ν¬κΈ°κ° 컀μ§λ©° λ±μ₯ν©λλ€. λ²νΌμ΄λ μ±κ³΅ μμ΄μ½ λ±μ κ°μ‘°ν λ μ’μ΅λλ€.
ScaleBounce(
initialScale: 0.5,
peakScale: 1.2,
duration: Duration(milliseconds: 800),
child: SuccessIcon(),
)
π μ νΈλ¦¬ν° #
μμ°¨ μ λλ©μ΄μ (Staggered Animation)
μλ κ³μ° μμ΄ μμλ€μ μμ°¨μ μΌλ‘ λ±μ₯μν¬ μ μμ΅λλ€.
Column(
children: buildSequentialAnimations(
children: [νλͺ©1, νλͺ©2, νλͺ©3],
builder: (child, delay) => SlideFadeIn(delay: delay, child: child),
),
)
π λ νΌλ°μ€ #
SlideDirection (SlideFadeIn μ μ©)
fromBottom,fromTop,fromLeft,fromRight(+ λκ°μ λ°©ν₯)none(νμ΄λ ν¨κ³Όλ§ μ μ©)