mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
Added title (#614)
This commit is contained in:
@@ -48,7 +48,9 @@ class _AnimatedContainerDemoState extends State<AnimatedContainerDemo> {
|
|||||||
// the properties of a container. For example, you could use this to design expanding
|
// the properties of a container. For example, you could use this to design expanding
|
||||||
// and shrinking cards.
|
// and shrinking cards.
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(),
|
appBar: AppBar(
|
||||||
|
title: Text('AnimatedContainer'),
|
||||||
|
),
|
||||||
body: Center(
|
body: Center(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@@ -10,7 +10,9 @@ class PageRouteBuilderDemo extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(),
|
appBar: AppBar(
|
||||||
|
title: Text('Page 1'),
|
||||||
|
),
|
||||||
body: Center(
|
body: Center(
|
||||||
child: RaisedButton(
|
child: RaisedButton(
|
||||||
child: Text('Go!'),
|
child: Text('Go!'),
|
||||||
@@ -42,7 +44,9 @@ class _Page2 extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(),
|
appBar: AppBar(
|
||||||
|
title: Text('Page 2'),
|
||||||
|
),
|
||||||
body: Center(
|
body: Center(
|
||||||
child: Text('Page 2!', style: Theme.of(context).textTheme.headline4),
|
child: Text('Page 2!', style: Theme.of(context).textTheme.headline4),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -53,7 +53,9 @@ class _AnimationControllerDemoState extends State<AnimationControllerDemo>
|
|||||||
// when building child widgets. You can also check the status to see if the animation
|
// when building child widgets. You can also check the status to see if the animation
|
||||||
// has completed.
|
// has completed.
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(),
|
appBar: AppBar(
|
||||||
|
title: Text('Animation Controller'),
|
||||||
|
),
|
||||||
body: Center(
|
body: Center(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
|||||||
@@ -39,7 +39,9 @@ class _TweenDemoState extends State<TweenDemo>
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(),
|
appBar: AppBar(
|
||||||
|
title: Text('Tweens'),
|
||||||
|
),
|
||||||
body: Center(
|
body: Center(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
|||||||
@@ -37,7 +37,9 @@ class _AnimatedBuilderDemoState extends State<AnimatedBuilderDemo>
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(),
|
appBar: AppBar(
|
||||||
|
title: Text('AnimatedBuilder'),
|
||||||
|
),
|
||||||
body: Center(
|
body: Center(
|
||||||
// AnimatedBuilder handles listening to a given animation and calling the builder
|
// 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
|
// whenever the value of the animation change. This can be useful when a Widget
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ class _CustomTweenDemoState extends State<CustomTweenDemo>
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
|
title: Text('Custom Tween'),
|
||||||
actions: [
|
actions: [
|
||||||
MaterialButton(
|
MaterialButton(
|
||||||
child: Text(
|
child: Text(
|
||||||
|
|||||||
@@ -59,7 +59,9 @@ class _TweenSequenceDemoState extends State<TweenSequenceDemo>
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(),
|
appBar: AppBar(
|
||||||
|
title: Text('Tween Sequences'),
|
||||||
|
),
|
||||||
body: Center(
|
body: Center(
|
||||||
child: AnimatedBuilder(
|
child: AnimatedBuilder(
|
||||||
animation: animation,
|
animation: animation,
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class _FadeTransitionDemoState extends State<FadeTransitionDemo>
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text(
|
title: Text(
|
||||||
'Animated Widget',
|
'Fade Transition',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
body: Center(
|
body: Center(
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ class _AnimatedListDemoState extends State<AnimatedListDemo> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
|
title: Text('AnimatedList'),
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: Icon(Icons.add),
|
icon: Icon(Icons.add),
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class _AnimatedPositionedDemoState extends State<AnimatedPositionedDemo> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final size = MediaQuery.of(context).size;
|
final size = MediaQuery.of(context).size;
|
||||||
final appBar = AppBar();
|
final appBar = AppBar(title: Text('AnimatedPositioned'));
|
||||||
final topPadding = MediaQuery.of(context).padding.top;
|
final topPadding = MediaQuery.of(context).padding.top;
|
||||||
// AnimatedPositioned animates changes to a widget's position within a Stack
|
// AnimatedPositioned animates changes to a widget's position within a Stack
|
||||||
return SafeArea(
|
return SafeArea(
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ class _AnimatedSwitcherDemoState extends State<AnimatedSwitcherDemo> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
|
title: Text('AnimatedSwitcher'),
|
||||||
actions: [
|
actions: [
|
||||||
MaterialButton(
|
MaterialButton(
|
||||||
onPressed: () => setState(
|
onPressed: () => setState(
|
||||||
|
|||||||
@@ -10,7 +10,9 @@ class ExpandCardDemo extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(),
|
appBar: AppBar(
|
||||||
|
title: Text('Expandable Card'),
|
||||||
|
),
|
||||||
body: Center(
|
body: Center(
|
||||||
child: ExpandCard(),
|
child: ExpandCard(),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -10,7 +10,9 @@ class HeroAnimationDemo extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(),
|
appBar: AppBar(
|
||||||
|
title: Text('Hero Animation'),
|
||||||
|
),
|
||||||
body: GestureDetector(
|
body: GestureDetector(
|
||||||
child: Hero(
|
child: Hero(
|
||||||
tag: 'hero-page-child',
|
tag: 'hero-page-child',
|
||||||
|
|||||||
@@ -11,7 +11,9 @@ class PhysicsCardDragDemo extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(),
|
appBar: AppBar(
|
||||||
|
title: Text('Spring Physics'),
|
||||||
|
),
|
||||||
body: DraggableCard(
|
body: DraggableCard(
|
||||||
child: FlutterLogo(
|
child: FlutterLogo(
|
||||||
size: 128,
|
size: 128,
|
||||||
|
|||||||
Reference in New Issue
Block a user