mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
Moved two animation vignettes into misc. (#425)
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
# Animation Samples
|
# Animation Samples
|
||||||
Sample apps that showcasing Flutter's animation features
|
Sample apps that showcase Flutter's animation features
|
||||||
|
|
||||||
## Goals
|
## Goals
|
||||||
|
|
||||||
- Demonstrate the building blocks for animations and how they work together
|
- Demonstrate the building blocks for animations and how they work together.
|
||||||
- Provide samples for common patterns and use-cases
|
- Provide samples for common patterns and use-cases.
|
||||||
|
|
||||||
## Samples
|
## Samples
|
||||||
|
|
||||||
@@ -12,38 +12,40 @@ Sample apps that showcasing Flutter's animation features
|
|||||||
|
|
||||||
Building blocks and patterns
|
Building blocks and patterns
|
||||||
|
|
||||||
1. **AnimatedContainerDemo** Demonstrates how to use `AnimatedContainer`.
|
1. **AnimatedContainerDemo**: Demonstrates how to use `AnimatedContainer`.
|
||||||
2. **PageRouteBuilderDemo** Demonstrates how to use `Tween` and `Animation` to
|
2. **PageRouteBuilderDemo**: Demonstrates how to use `Tween` and `Animation` to
|
||||||
*build a custom page route transition.
|
build a custom page route transition.
|
||||||
3. **AnimationControllerDemo** Demonstrates how to use an `AnimationController`.
|
3. **AnimationControllerDemo**: Demonstrates how to use an
|
||||||
4. **TweenDemo** Demonstrates how to use a `Tween` with an
|
`AnimationController`.
|
||||||
`AnimationController`.
|
4. **TweenDemo**: Demonstrates how to use a `Tween` with an
|
||||||
5. **AnimatedBuilderDemo** Demonstrates how to use an `AnimatedBuilder` with an
|
`AnimationController`.
|
||||||
`AnimationController`.
|
5. **AnimatedBuilderDemo**: Demonstrates how to use an `AnimatedBuilder` with an
|
||||||
6. **CustomTweenDemo** Demonstrates how to extend `Tween`.
|
`AnimationController`.
|
||||||
7. **TweenSequenceDemo** Demonstrates how to use `TweenSequence` to build a
|
6. **CustomTweenDemo**: Demonstrates how to extend `Tween`.
|
||||||
button that changes between different colors.
|
7. **TweenSequenceDemo**: Demonstrates how to use `TweenSequence` to build a
|
||||||
8. **FadeTransitionDemo** Demonstrates how to use `FadeTransition`.
|
button that changes between different colors.
|
||||||
9. **AnimatedPositionedDemo** Demonstrates how to use `AnimatedPositioned`.
|
8. **FadeTransitionDemo**: Demonstrates how to use `FadeTransition`.
|
||||||
10. **AnimatedSwitcherDemo** Demonstrates how to use `AnimatedSwitcher`.
|
|
||||||
|
|
||||||
### Misc
|
### Misc
|
||||||
|
|
||||||
Other uses-cases and examples
|
Other uses-cases and examples
|
||||||
|
|
||||||
- **RepeatingAnimationDemo** Demonstrates how to repeat an animation.
|
- **RepeatingAnimationDemo**: Demonstrates how to repeat an animation.
|
||||||
- **ExpandCardDemo** Demonstrates how to use `AnimatedCrossFade` to fade between
|
- **ExpandCardDemo**: Demonstrates how to use `AnimatedCrossFade` to fade
|
||||||
two widgets and change the size.
|
between two widgets and change the size.
|
||||||
- **CarouselDemo** Demonstrates how to use `PageView` with a custom animation.
|
- **CarouselDemo**: Demonstrates how to use `PageView` with a custom animation.
|
||||||
- **FocusImageDemo** Demonstrates how to measure the size of a widget and expand
|
- **FocusImageDemo**: Demonstrates how to measure the size of a widget and
|
||||||
it using a `PageRouteBuilder`.
|
expand it using a `PageRouteBuilder`.
|
||||||
- **PhysicsCardDragDemo** Demonstrates how to run an AnimationController with a
|
- **PhysicsCardDragDemo**: Demonstrates how to run an AnimationController with a
|
||||||
spring simulation.
|
spring simulation.
|
||||||
- **CardSwipeDemo** A swipeable card that demonstrates how to use gesture
|
- **CardSwipeDemo**: A swipeable card that demonstrates how to use gesture
|
||||||
detection to drive an animation.
|
detection to drive an animation.
|
||||||
- **AnimatedList** Demonstrates how to use `AnimatedList`.
|
- **AnimatedList**: Demonstrates how to use `AnimatedList`.
|
||||||
- **HeroAnimationDemo** Demonstrates how to use `Hero` animation.
|
- **AnimatedPositionedDemo**: Demonstrates how to use `AnimatedPositioned`.
|
||||||
- **CurvedAnimationDemo** Demonstrates how to use different curves in `CurvedAnimation`.
|
- **AnimatedSwitcherDemo**: Demonstrates how to use `AnimatedSwitcher`.
|
||||||
|
- **HeroAnimationDemo**: Demonstrates how to use `Hero` animation.
|
||||||
|
- **CurvedAnimationDemo**: Demonstrates how to use different curves in
|
||||||
|
`CurvedAnimation`.
|
||||||
|
|
||||||
## Other Resources
|
## Other Resources
|
||||||
|
|
||||||
@@ -51,3 +53,4 @@ detection to drive an animation.
|
|||||||
- [Animation widgets](https://flutter.dev/docs/development/ui/widgets/animation)
|
- [Animation widgets](https://flutter.dev/docs/development/ui/widgets/animation)
|
||||||
- [Flutter cookbook - Animations](https://flutter.dev/docs/cookbook/animation)
|
- [Flutter cookbook - Animations](https://flutter.dev/docs/cookbook/animation)
|
||||||
- [Animations tutorial](https://flutter.dev/docs/development/ui/animations/tutorial)
|
- [Animations tutorial](https://flutter.dev/docs/development/ui/animations/tutorial)
|
||||||
|
- [Implicit animation codelab](https://flutter.dev/docs/codelabs/implicit-animations)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'src/basics/01_animated_container.dart';
|
import 'src/basics/01_animated_container.dart';
|
||||||
import 'src/basics/02_page_route_builder.dart';
|
import 'src/basics/02_page_route_builder.dart';
|
||||||
import 'src/basics/03_animation_controller.dart';
|
import 'src/basics/03_animation_controller.dart';
|
||||||
@@ -11,9 +12,9 @@ import 'src/basics/05_animated_builder.dart';
|
|||||||
import 'src/basics/06_custom_tween.dart';
|
import 'src/basics/06_custom_tween.dart';
|
||||||
import 'src/basics/07_tween_sequence.dart';
|
import 'src/basics/07_tween_sequence.dart';
|
||||||
import 'src/basics/08_fade_transition.dart';
|
import 'src/basics/08_fade_transition.dart';
|
||||||
import 'src/basics/09_animated_positioned.dart';
|
|
||||||
import 'src/basics/10_animated_switcher.dart';
|
|
||||||
import 'src/misc/animated_list.dart';
|
import 'src/misc/animated_list.dart';
|
||||||
|
import 'src/misc/animated_positioned.dart';
|
||||||
|
import 'src/misc/animated_switcher.dart';
|
||||||
import 'src/misc/card_swipe.dart';
|
import 'src/misc/card_swipe.dart';
|
||||||
import 'src/misc/carousel.dart';
|
import 'src/misc/carousel.dart';
|
||||||
import 'src/misc/curved_animation.dart';
|
import 'src/misc/curved_animation.dart';
|
||||||
@@ -66,14 +67,6 @@ final basicDemos = [
|
|||||||
name: 'Fade Transition',
|
name: 'Fade Transition',
|
||||||
route: FadeTransitionDemo.routeName,
|
route: FadeTransitionDemo.routeName,
|
||||||
builder: (context) => FadeTransitionDemo()),
|
builder: (context) => FadeTransitionDemo()),
|
||||||
Demo(
|
|
||||||
name: 'AnimatedPositioned',
|
|
||||||
route: AnimatedPositionedDemo.routeName,
|
|
||||||
builder: (context) => AnimatedPositionedDemo()),
|
|
||||||
Demo(
|
|
||||||
name: 'AnimatedSwitcher',
|
|
||||||
route: AnimatedSwitcherDemo.routeName,
|
|
||||||
builder: (context) => AnimatedSwitcherDemo())
|
|
||||||
];
|
];
|
||||||
|
|
||||||
final miscDemos = [
|
final miscDemos = [
|
||||||
@@ -105,6 +98,14 @@ final miscDemos = [
|
|||||||
name: 'AnimatedList',
|
name: 'AnimatedList',
|
||||||
route: AnimatedListDemo.routeName,
|
route: AnimatedListDemo.routeName,
|
||||||
builder: (context) => AnimatedListDemo()),
|
builder: (context) => AnimatedListDemo()),
|
||||||
|
Demo(
|
||||||
|
name: 'AnimatedPositioned',
|
||||||
|
route: AnimatedPositionedDemo.routeName,
|
||||||
|
builder: (context) => AnimatedPositionedDemo()),
|
||||||
|
Demo(
|
||||||
|
name: 'AnimatedSwitcher',
|
||||||
|
route: AnimatedSwitcherDemo.routeName,
|
||||||
|
builder: (context) => AnimatedSwitcherDemo()),
|
||||||
Demo(
|
Demo(
|
||||||
name: 'Hero Animation',
|
name: 'Hero Animation',
|
||||||
route: HeroAnimationDemo.routeName,
|
route: HeroAnimationDemo.routeName,
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ packages:
|
|||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.15"
|
version: "0.2.11"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
Reference in New Issue
Block a user