路由生命周期状态
This commit is contained in:
22
lib/11/transition.dart
Normal file
22
lib/11/transition.dart
Normal file
@@ -0,0 +1,22 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
RouteTransitionsBuilder kSlideBottomToTopWithSecondary = (
|
||||
BuildContext context,
|
||||
Animation<double> animation,
|
||||
Animation<double> secondaryAnimation,
|
||||
Widget child,
|
||||
) {
|
||||
return SlideTransition(
|
||||
position: Tween<Offset>(
|
||||
begin: const Offset(0.0, 1.0),
|
||||
end: Offset.zero,
|
||||
).animate(animation),
|
||||
child: SlideTransition(
|
||||
position: Tween<Offset>(
|
||||
begin: Offset.zero,
|
||||
end: const Offset(0.0, 1.0),
|
||||
).animate(secondaryAnimation),
|
||||
child: child,
|
||||
),
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user