1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-09 14:28:51 +00:00

Add scroll physics demo (#123)

* add spring physics card demo

* fix button colors in animations project

* code review updates

* refactor method into runAnimation

* combine updateAnimation and runAnimation

* update comment
This commit is contained in:
John Ryan
2019-08-08 10:10:57 -07:00
committed by GitHub
parent cc0c0dadd2
commit b51d75966a
4 changed files with 122 additions and 2 deletions

View File

@@ -9,7 +9,6 @@ class PageRouteBuilderDemo extends StatelessWidget {
body: Center(
child: RaisedButton(
child: Text('Go!'),
color: Theme.of(context).primaryColor,
onPressed: () {
Navigator.of(context).push(_createRoute());
},

View File

@@ -43,12 +43,13 @@ class _CustomTweenDemoState extends State<CustomTweenDemo>
return Scaffold(
appBar: AppBar(
actions: [
RaisedButton(
MaterialButton(
child: Text(
controller.status == AnimationStatus.completed
? 'Delete Essay'
: 'Write Essay',
),
textColor: Colors.white,
onPressed: () {
if (controller.status == AnimationStatus.completed) {
controller.reverse();