parent
30150df695
commit
d3d64ad1ec
@ -0,0 +1,21 @@
|
||||
import 'package:flutter/Material.dart';
|
||||
import 'package:justmusic/screens/profile_screen.dart';
|
||||
|
||||
Route createRoute() {
|
||||
return PageRouteBuilder(
|
||||
pageBuilder: (context, animation, secondaryAnimation) =>
|
||||
const ProfileScreen(),
|
||||
transitionsBuilder: (context, animation, secondaryAnimation, child) {
|
||||
const begin = Offset(1.0, 0.0);
|
||||
const end = Offset.zero;
|
||||
const curve = Curves.ease;
|
||||
|
||||
var tween = Tween(begin: begin, end: end).chain(CurveTween(curve: curve));
|
||||
|
||||
return SlideTransition(
|
||||
position: animation.drive(tween),
|
||||
child: child,
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
Loading…
Reference in new issue