From e940d54618346b990b5d20efdf6e938fd7db7ac4 Mon Sep 17 00:00:00 2001 From: Alabhya Date: Tue, 15 Dec 2020 11:31:15 +0530 Subject: [PATCH] Added title (#614) --- animations/lib/src/basics/01_animated_container.dart | 4 +++- animations/lib/src/basics/02_page_route_builder.dart | 8 ++++++-- animations/lib/src/basics/03_animation_controller.dart | 4 +++- animations/lib/src/basics/04_tweens.dart | 4 +++- animations/lib/src/basics/05_animated_builder.dart | 4 +++- animations/lib/src/basics/06_custom_tween.dart | 1 + animations/lib/src/basics/07_tween_sequence.dart | 4 +++- animations/lib/src/basics/08_fade_transition.dart | 2 +- animations/lib/src/misc/animated_list.dart | 1 + animations/lib/src/misc/animated_positioned.dart | 2 +- animations/lib/src/misc/animated_switcher.dart | 1 + animations/lib/src/misc/expand_card.dart | 4 +++- animations/lib/src/misc/hero_animation.dart | 4 +++- animations/lib/src/misc/physics_card_drag.dart | 4 +++- 14 files changed, 35 insertions(+), 12 deletions(-) diff --git a/animations/lib/src/basics/01_animated_container.dart b/animations/lib/src/basics/01_animated_container.dart index 9256e0afd..c726f05c2 100644 --- a/animations/lib/src/basics/01_animated_container.dart +++ b/animations/lib/src/basics/01_animated_container.dart @@ -48,7 +48,9 @@ class _AnimatedContainerDemoState extends State { // 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: [ diff --git a/animations/lib/src/basics/02_page_route_builder.dart b/animations/lib/src/basics/02_page_route_builder.dart index 9e314c575..b237fc0f7 100644 --- a/animations/lib/src/basics/02_page_route_builder.dart +++ b/animations/lib/src/basics/02_page_route_builder.dart @@ -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!'), @@ -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), ), diff --git a/animations/lib/src/basics/03_animation_controller.dart b/animations/lib/src/basics/03_animation_controller.dart index 97088e5c7..e6f5ae752 100644 --- a/animations/lib/src/basics/03_animation_controller.dart +++ b/animations/lib/src/basics/03_animation_controller.dart @@ -53,7 +53,9 @@ class _AnimationControllerDemoState extends State // 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, diff --git a/animations/lib/src/basics/04_tweens.dart b/animations/lib/src/basics/04_tweens.dart index 28d772c53..492d7efd9 100644 --- a/animations/lib/src/basics/04_tweens.dart +++ b/animations/lib/src/basics/04_tweens.dart @@ -39,7 +39,9 @@ class _TweenDemoState extends State @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar(), + appBar: AppBar( + title: Text('Tweens'), + ), body: Center( child: Column( mainAxisSize: MainAxisSize.min, diff --git a/animations/lib/src/basics/05_animated_builder.dart b/animations/lib/src/basics/05_animated_builder.dart index 766fc3bf7..70919886c 100644 --- a/animations/lib/src/basics/05_animated_builder.dart +++ b/animations/lib/src/basics/05_animated_builder.dart @@ -37,7 +37,9 @@ class _AnimatedBuilderDemoState extends State @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 diff --git a/animations/lib/src/basics/06_custom_tween.dart b/animations/lib/src/basics/06_custom_tween.dart index fed5cfd3c..2b78dbf06 100644 --- a/animations/lib/src/basics/06_custom_tween.dart +++ b/animations/lib/src/basics/06_custom_tween.dart @@ -47,6 +47,7 @@ class _CustomTweenDemoState extends State Widget build(BuildContext context) { return Scaffold( appBar: AppBar( + title: Text('Custom Tween'), actions: [ MaterialButton( child: Text( diff --git a/animations/lib/src/basics/07_tween_sequence.dart b/animations/lib/src/basics/07_tween_sequence.dart index 81dc9fc26..231458777 100644 --- a/animations/lib/src/basics/07_tween_sequence.dart +++ b/animations/lib/src/basics/07_tween_sequence.dart @@ -59,7 +59,9 @@ class _TweenSequenceDemoState extends State @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar(), + appBar: AppBar( + title: Text('Tween Sequences'), + ), body: Center( child: AnimatedBuilder( animation: animation, diff --git a/animations/lib/src/basics/08_fade_transition.dart b/animations/lib/src/basics/08_fade_transition.dart index c0df6ff3c..28776f661 100644 --- a/animations/lib/src/basics/08_fade_transition.dart +++ b/animations/lib/src/basics/08_fade_transition.dart @@ -46,7 +46,7 @@ class _FadeTransitionDemoState extends State return Scaffold( appBar: AppBar( title: Text( - 'Animated Widget', + 'Fade Transition', ), ), body: Center( diff --git a/animations/lib/src/misc/animated_list.dart b/animations/lib/src/misc/animated_list.dart index 2ec0b5aa4..7c9aff2ae 100644 --- a/animations/lib/src/misc/animated_list.dart +++ b/animations/lib/src/misc/animated_list.dart @@ -68,6 +68,7 @@ class _AnimatedListDemoState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( + title: Text('AnimatedList'), actions: [ IconButton( icon: Icon(Icons.add), diff --git a/animations/lib/src/misc/animated_positioned.dart b/animations/lib/src/misc/animated_positioned.dart index 0270a308a..641ff91eb 100644 --- a/animations/lib/src/misc/animated_positioned.dart +++ b/animations/lib/src/misc/animated_positioned.dart @@ -38,7 +38,7 @@ class _AnimatedPositionedDemoState extends State { @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( diff --git a/animations/lib/src/misc/animated_switcher.dart b/animations/lib/src/misc/animated_switcher.dart index a54737366..4c316d230 100644 --- a/animations/lib/src/misc/animated_switcher.dart +++ b/animations/lib/src/misc/animated_switcher.dart @@ -44,6 +44,7 @@ class _AnimatedSwitcherDemoState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( + title: Text('AnimatedSwitcher'), actions: [ MaterialButton( onPressed: () => setState( diff --git a/animations/lib/src/misc/expand_card.dart b/animations/lib/src/misc/expand_card.dart index 6f97fabbf..fe4f80394 100644 --- a/animations/lib/src/misc/expand_card.dart +++ b/animations/lib/src/misc/expand_card.dart @@ -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(), ), diff --git a/animations/lib/src/misc/hero_animation.dart b/animations/lib/src/misc/hero_animation.dart index 46b0e1b5f..8579cb2ff 100644 --- a/animations/lib/src/misc/hero_animation.dart +++ b/animations/lib/src/misc/hero_animation.dart @@ -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', diff --git a/animations/lib/src/misc/physics_card_drag.dart b/animations/lib/src/misc/physics_card_drag.dart index 37109857b..99443a8a3 100644 --- a/animations/lib/src/misc/physics_card_drag.dart +++ b/animations/lib/src/misc/physics_card_drag.dart @@ -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,