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:
@@ -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());
|
||||
},
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user