Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion animations/lib/src/basics/01_animated_container.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ class _AnimatedContainerDemoState extends State<AnimatedContainerDemo> {
// the properties of a container. For example, you could use this to design expanding
// and shrinking cards.
return Scaffold(
appBar: AppBar(),
appBar: AppBar(
title: Text('AnimatedContainer'),
),
body: Center(
child: Column(
children: [
Expand Down
8 changes: 6 additions & 2 deletions animations/lib/src/basics/02_page_route_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ class PageRouteBuilderDemo extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
appBar: AppBar(
title: Text('Page 1'),
),
body: Center(
child: RaisedButton(
child: Text('Go!'),
Expand Down Expand Up @@ -42,7 +44,9 @@ class _Page2 extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
appBar: AppBar(
title: Text('Page 2'),
),
body: Center(
child: Text('Page 2!', style: Theme.of(context).textTheme.headline4),
),
Expand Down
4 changes: 3 additions & 1 deletion animations/lib/src/basics/03_animation_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ class _AnimationControllerDemoState extends State<AnimationControllerDemo>
// when building child widgets. You can also check the status to see if the animation
// has completed.
return Scaffold(
appBar: AppBar(),
appBar: AppBar(
title: Text('Animation Controller'),
),
body: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
Expand Down
4 changes: 3 additions & 1 deletion animations/lib/src/basics/04_tweens.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ class _TweenDemoState extends State<TweenDemo>
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
appBar: AppBar(
title: Text('Tweens'),
),
body: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
Expand Down
4 changes: 3 additions & 1 deletion animations/lib/src/basics/05_animated_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ class _AnimatedBuilderDemoState extends State<AnimatedBuilderDemo>
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
appBar: AppBar(
title: Text('AnimatedBuilder'),
),
body: Center(
// AnimatedBuilder handles listening to a given animation and calling the builder
// whenever the value of the animation change. This can be useful when a Widget
Expand Down
1 change: 1 addition & 0 deletions animations/lib/src/basics/06_custom_tween.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class _CustomTweenDemoState extends State<CustomTweenDemo>
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Custom Tween'),
actions: [
MaterialButton(
child: Text(
Expand Down
4 changes: 3 additions & 1 deletion animations/lib/src/basics/07_tween_sequence.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ class _TweenSequenceDemoState extends State<TweenSequenceDemo>
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
appBar: AppBar(
title: Text('Tween Sequences'),
),
body: Center(
child: AnimatedBuilder(
animation: animation,
Expand Down
2 changes: 1 addition & 1 deletion animations/lib/src/basics/08_fade_transition.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class _FadeTransitionDemoState extends State<FadeTransitionDemo>
return Scaffold(
appBar: AppBar(
title: Text(
'Animated Widget',
'Fade Transition',
),
),
body: Center(
Expand Down
1 change: 1 addition & 0 deletions animations/lib/src/misc/animated_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class _AnimatedListDemoState extends State<AnimatedListDemo> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('AnimatedList'),
actions: <Widget>[
IconButton(
icon: Icon(Icons.add),
Expand Down
2 changes: 1 addition & 1 deletion animations/lib/src/misc/animated_positioned.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class _AnimatedPositionedDemoState extends State<AnimatedPositionedDemo> {
@override
Widget build(BuildContext context) {
final size = MediaQuery.of(context).size;
final appBar = AppBar();
final appBar = AppBar(title: Text('AnimatedPositioned'));
final topPadding = MediaQuery.of(context).padding.top;
// AnimatedPositioned animates changes to a widget's position within a Stack
return SafeArea(
Expand Down
1 change: 1 addition & 0 deletions animations/lib/src/misc/animated_switcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class _AnimatedSwitcherDemoState extends State<AnimatedSwitcherDemo> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('AnimatedSwitcher'),
actions: [
MaterialButton(
onPressed: () => setState(
Expand Down
4 changes: 3 additions & 1 deletion animations/lib/src/misc/expand_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ class ExpandCardDemo extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
appBar: AppBar(
title: Text('Expandable Card'),
),
body: Center(
child: ExpandCard(),
),
Expand Down
4 changes: 3 additions & 1 deletion animations/lib/src/misc/hero_animation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ class HeroAnimationDemo extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
appBar: AppBar(
title: Text('Hero Animation'),
),
body: GestureDetector(
child: Hero(
tag: 'hero-page-child',
Expand Down
4 changes: 3 additions & 1 deletion animations/lib/src/misc/physics_card_drag.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ class PhysicsCardDragDemo extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
appBar: AppBar(
title: Text('Spring Physics'),
),
body: DraggableCard(
child: FlutterLogo(
size: 128,
Expand Down