buildDialogRoute method
DialogRoute
buildDialogRoute(
- Widget child,
- Duration duration,
- Curve curve,
- BuildContext context,
override
Implementation
@override
DialogRoute buildDialogRoute(Widget child, Duration duration, Curve curve, BuildContext context) {
return DialogRoute(
context: context, // Replace null with your context.
builder: (_) {
// Replace this with your own custom path animation logic for dialogs.
// This is just a placeholder to show how you can define a custom path animation for dialogs.
double x = 100.0;
double y = 50.0;
return Transform.translate(
offset: Offset(x, y),
child: child,
);
},
);
}