snapshot of https://github.com/flutter/samples.git (main, 2026-09-16; blobs > 131072B omitted)
Some checks failed
Main Branch CI / Test Flutter beta on ubuntu-latest (push) Has been skipped
Main Branch CI / Test Flutter stable on ubuntu-latest (push) Has been skipped
Main Branch CI / Test Flutter beta on macos-latest (push) Has been cancelled
Main Branch CI / Test Flutter stable on macos-latest (push) Has been cancelled

This commit is contained in:
upstream-mirror
2026-09-16 01:43:26 +05:00
commit 9ed6a80afa
2886 changed files with 140184 additions and 0 deletions

56
animations/README.md Normal file
View File

@@ -0,0 +1,56 @@
# Animation Samples
Sample apps that showcase Flutter's animation features
## Goals
- Demonstrate the building blocks for animations and how they work together.
- Provide samples for common patterns and use-cases.
## Samples
### Basics
Building blocks and patterns
1. **AnimatedContainerDemo**: Demonstrates how to use `AnimatedContainer`.
2. **PageRouteBuilderDemo**: Demonstrates how to use `Tween` and `Animation` to
build a custom page route transition.
3. **AnimationControllerDemo**: Demonstrates how to use an
`AnimationController`.
4. **TweenDemo**: Demonstrates how to use a `Tween` with an
`AnimationController`.
5. **AnimatedBuilderDemo**: Demonstrates how to use an `AnimatedBuilder` with an
`AnimationController`.
6. **CustomTweenDemo**: Demonstrates how to extend `Tween`.
7. **TweenSequenceDemo**: Demonstrates how to use `TweenSequence` to build a
button that changes between different colors.
8. **FadeTransitionDemo**: Demonstrates how to use `FadeTransition`.
### Misc
Other uses-cases and examples
- **RepeatingAnimationDemo**: Demonstrates how to repeat an animation.
- **ExpandCardDemo**: Demonstrates how to use `AnimatedCrossFade` to fade
between two widgets and change the size.
- **CarouselDemo**: Demonstrates how to use `PageView` with a custom animation.
- **FocusImageDemo**: Demonstrates how to measure the size of a widget and
expand it using a `PageRouteBuilder`.
- **PhysicsCardDragDemo**: Demonstrates how to run an AnimationController with a
spring simulation.
- **CardSwipeDemo**: A swipeable card that demonstrates how to use gesture
detection to drive an animation.
- **AnimatedList**: Demonstrates how to use `AnimatedList`.
- **AnimatedPositionedDemo**: Demonstrates how to use `AnimatedPositioned`.
- **AnimatedSwitcherDemo**: Demonstrates how to use `AnimatedSwitcher`.
- **HeroAnimationDemo**: Demonstrates how to use `Hero` animation.
- **CurvedAnimationDemo**: Demonstrates how to use different curves in
`CurvedAnimation`.
## Other Resources
- [Introduction to animations](https://flutter.dev/docs/development/ui/animations)
- [Animation widgets](https://flutter.dev/docs/development/ui/widgets/animation)
- [Flutter cookbook - Animations](https://flutter.dev/docs/cookbook/animation)
- [Animations tutorial](https://flutter.dev/docs/development/ui/animations/tutorial)
- [Implicit animation codelab](https://flutter.dev/docs/codelabs/implicit-animations)