create static method
RouteTransitionsBuilder
create(
- ShaderTransition transition, {
- VoidCallback? onStart,
- VoidCallback? onComplete,
- ValueChanged<
double> ? onProgress,
Creates a RouteTransitionsBuilder for the given transition.
The ShaderMaskTransition manages the FragmentShader lifecycle
internally and falls back to FadeTransition if shaders were not
preloaded. onStart / onComplete / onProgress are forwarded so the
app can play its own sound or react to progress.
Implementation
static RouteTransitionsBuilder create(
ShaderTransition transition, {
VoidCallback? onStart,
VoidCallback? onComplete,
ValueChanged<double>? onProgress,
}) {
return (
BuildContext context,
Animation<double> animation,
Animation<double> secondaryAnimation,
Widget child,
) {
return ShaderMaskTransition(
animation: animation,
transition: transition,
onStart: onStart,
onComplete: onComplete,
onProgress: onProgress,
child: child,
);
};
}