Skip to content

Commit c7f5030

Browse files
authored
Moved two animation vignettes into misc. (#425)
1 parent 9a464fa commit c7f5030

File tree

5 files changed

+45
-41
lines changed

5 files changed

+45
-41
lines changed

animations/README.md

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,56 @@
11
# Animation Samples
2-
Sample apps that showcasing Flutter's animation features
2+
Sample apps that showcase Flutter's animation features
33

44
## Goals
55

6-
- Demonstrate the building blocks for animations and how they work together
7-
- Provide samples for common patterns and use-cases
6+
- Demonstrate the building blocks for animations and how they work together.
7+
- Provide samples for common patterns and use-cases.
88

99
## Samples
1010

1111
### Basics
1212

1313
Building blocks and patterns
1414

15-
1. **AnimatedContainerDemo** Demonstrates how to use `AnimatedContainer`.
16-
2. **PageRouteBuilderDemo** Demonstrates how to use `Tween` and `Animation` to
17-
*build a custom page route transition.
18-
3. **AnimationControllerDemo** Demonstrates how to use an `AnimationController`.
19-
4. **TweenDemo** Demonstrates how to use a `Tween` with an
20-
`AnimationController`.
21-
5. **AnimatedBuilderDemo** Demonstrates how to use an `AnimatedBuilder` with an
22-
`AnimationController`.
23-
6. **CustomTweenDemo** Demonstrates how to extend `Tween`.
24-
7. **TweenSequenceDemo** Demonstrates how to use `TweenSequence` to build a
25-
button that changes between different colors.
26-
8. **FadeTransitionDemo** Demonstrates how to use `FadeTransition`.
27-
9. **AnimatedPositionedDemo** Demonstrates how to use `AnimatedPositioned`.
28-
10. **AnimatedSwitcherDemo** Demonstrates how to use `AnimatedSwitcher`.
15+
1. **AnimatedContainerDemo**: Demonstrates how to use `AnimatedContainer`.
16+
2. **PageRouteBuilderDemo**: Demonstrates how to use `Tween` and `Animation` to
17+
build a custom page route transition.
18+
3. **AnimationControllerDemo**: Demonstrates how to use an
19+
`AnimationController`.
20+
4. **TweenDemo**: Demonstrates how to use a `Tween` with an
21+
`AnimationController`.
22+
5. **AnimatedBuilderDemo**: Demonstrates how to use an `AnimatedBuilder` with an
23+
`AnimationController`.
24+
6. **CustomTweenDemo**: Demonstrates how to extend `Tween`.
25+
7. **TweenSequenceDemo**: Demonstrates how to use `TweenSequence` to build a
26+
button that changes between different colors.
27+
8. **FadeTransitionDemo**: Demonstrates how to use `FadeTransition`.
2928

3029
### Misc
3130

3231
Other uses-cases and examples
3332

34-
- **RepeatingAnimationDemo** Demonstrates how to repeat an animation.
35-
- **ExpandCardDemo** Demonstrates how to use `AnimatedCrossFade` to fade between
36-
two widgets and change the size.
37-
- **CarouselDemo** Demonstrates how to use `PageView` with a custom animation.
38-
- **FocusImageDemo** Demonstrates how to measure the size of a widget and expand
39-
it using a `PageRouteBuilder`.
40-
- **PhysicsCardDragDemo** Demonstrates how to run an AnimationController with a
41-
spring simulation.
42-
- **CardSwipeDemo** A swipeable card that demonstrates how to use gesture
43-
detection to drive an animation.
44-
- **AnimatedList** Demonstrates how to use `AnimatedList`.
45-
- **HeroAnimationDemo** Demonstrates how to use `Hero` animation.
46-
- **CurvedAnimationDemo** Demonstrates how to use different curves in `CurvedAnimation`.
33+
- **RepeatingAnimationDemo**: Demonstrates how to repeat an animation.
34+
- **ExpandCardDemo**: Demonstrates how to use `AnimatedCrossFade` to fade
35+
between two widgets and change the size.
36+
- **CarouselDemo**: Demonstrates how to use `PageView` with a custom animation.
37+
- **FocusImageDemo**: Demonstrates how to measure the size of a widget and
38+
expand it using a `PageRouteBuilder`.
39+
- **PhysicsCardDragDemo**: Demonstrates how to run an AnimationController with a
40+
spring simulation.
41+
- **CardSwipeDemo**: A swipeable card that demonstrates how to use gesture
42+
detection to drive an animation.
43+
- **AnimatedList**: Demonstrates how to use `AnimatedList`.
44+
- **AnimatedPositionedDemo**: Demonstrates how to use `AnimatedPositioned`.
45+
- **AnimatedSwitcherDemo**: Demonstrates how to use `AnimatedSwitcher`.
46+
- **HeroAnimationDemo**: Demonstrates how to use `Hero` animation.
47+
- **CurvedAnimationDemo**: Demonstrates how to use different curves in
48+
`CurvedAnimation`.
4749

4850
## Other Resources
4951

5052
- [Introduction to animations](https://flutter.dev/docs/development/ui/animations)
5153
- [Animation widgets](https://flutter.dev/docs/development/ui/widgets/animation)
5254
- [Flutter cookbook - Animations](https://flutter.dev/docs/cookbook/animation)
5355
- [Animations tutorial](https://flutter.dev/docs/development/ui/animations/tutorial)
56+
- [Implicit animation codelab](https://flutter.dev/docs/codelabs/implicit-animations)

animations/lib/main.dart

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// found in the LICENSE file.
44

55
import 'package:flutter/material.dart';
6+
67
import 'src/basics/01_animated_container.dart';
78
import 'src/basics/02_page_route_builder.dart';
89
import 'src/basics/03_animation_controller.dart';
@@ -11,9 +12,9 @@ import 'src/basics/05_animated_builder.dart';
1112
import 'src/basics/06_custom_tween.dart';
1213
import 'src/basics/07_tween_sequence.dart';
1314
import 'src/basics/08_fade_transition.dart';
14-
import 'src/basics/09_animated_positioned.dart';
15-
import 'src/basics/10_animated_switcher.dart';
1615
import 'src/misc/animated_list.dart';
16+
import 'src/misc/animated_positioned.dart';
17+
import 'src/misc/animated_switcher.dart';
1718
import 'src/misc/card_swipe.dart';
1819
import 'src/misc/carousel.dart';
1920
import 'src/misc/curved_animation.dart';
@@ -66,14 +67,6 @@ final basicDemos = [
6667
name: 'Fade Transition',
6768
route: FadeTransitionDemo.routeName,
6869
builder: (context) => FadeTransitionDemo()),
69-
Demo(
70-
name: 'AnimatedPositioned',
71-
route: AnimatedPositionedDemo.routeName,
72-
builder: (context) => AnimatedPositionedDemo()),
73-
Demo(
74-
name: 'AnimatedSwitcher',
75-
route: AnimatedSwitcherDemo.routeName,
76-
builder: (context) => AnimatedSwitcherDemo())
7770
];
7871

7972
final miscDemos = [
@@ -105,6 +98,14 @@ final miscDemos = [
10598
name: 'AnimatedList',
10699
route: AnimatedListDemo.routeName,
107100
builder: (context) => AnimatedListDemo()),
101+
Demo(
102+
name: 'AnimatedPositioned',
103+
route: AnimatedPositionedDemo.routeName,
104+
builder: (context) => AnimatedPositionedDemo()),
105+
Demo(
106+
name: 'AnimatedSwitcher',
107+
route: AnimatedSwitcherDemo.routeName,
108+
builder: (context) => AnimatedSwitcherDemo()),
108109
Demo(
109110
name: 'Hero Animation',
110111
route: HeroAnimationDemo.routeName,

animations/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ packages:
169169
name: test_api
170170
url: "https://pub.dartlang.org"
171171
source: hosted
172-
version: "0.2.15"
172+
version: "0.2.11"
173173
typed_data:
174174
dependency: transitive
175175
description:

0 commit comments

Comments
 (0)