1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-10 06:48:26 +00:00

Add shared analysis_options.yaml to animation samples (#145)

This commit is contained in:
Thea Flowers
2019-09-27 14:36:38 -07:00
committed by GitHub
parent 22ca7f462b
commit e3338726c6
6 changed files with 85 additions and 6 deletions

View File

@@ -14,7 +14,7 @@ class PageRouteBuilderDemo extends StatelessWidget {
child: RaisedButton(
child: Text('Go!'),
onPressed: () {
Navigator.of(context).push(_createRoute());
Navigator.of(context).push<void>(_createRoute());
},
),
),
@@ -23,7 +23,7 @@ class PageRouteBuilderDemo extends StatelessWidget {
}
Route _createRoute() {
return PageRouteBuilder(
return PageRouteBuilder<SlideTransition>(
pageBuilder: (context, animation, secondaryAnimation) => _Page2(),
transitionsBuilder: (context, animation, secondaryAnimation, child) {
var tween = Tween<Offset>(begin: Offset(0.0, 1.0), end: Offset.zero);