コード例 #1
0
 // 从右往左
 public static Route _createRoute_RL()
 {
     return(new PageRouteBuilder(
                pageBuilder: (context, animation, secondaryAnimation) => new Page2(),
                barrierColor: Color.black, //过度背景色,页面退出时显示
                transitionsBuilder: (context, animation, secondaryAnimation, child) =>
     {
         Offset begin = new Offset(1.0f, 0.0f);
         Offset end = Offset.zero;
         Curve curve = Curves.ease;
         //var tween = Tween(begin: begin, end: end).chain(new CurveTween(curve: curve));
         var tween = new OffsetTween(begin: begin, end: end).chain(new CurveTween(curve: curve));
         return new SlideTransition(
             position: animation.drive(tween),
             child: child
             );
     }
                ));
 }
コード例 #2
0
ファイル: curves.cs プロジェクト: billbai0102/Lollipop-Racer
 public Interval(float begin, float end, Curve curve = null)
 {
     this.begin = begin;
     this.end   = end;
     this.curve = curve ?? Curves.linear;
 }
コード例 #3
0
ファイル: curves.cs プロジェクト: billbai0102/Lollipop-Racer
 public FlippedCurve(Curve curve)
 {
     D.assert(curve != null);
     this.curve = curve;
 }