I already have a method to pass data. It can only pass one argument, but I want it to pass at least two arguments. How can I do that?
screen1
GestureDetector(
onTap: () => Navigator.of(context).push(PageTransition(settings: RouteSettings(
arguments:imageUrl,),type: PageTransitionType.fade,
child: const ShowPictureScreen())),
Receive on Screen2
@override
Widget build(BuildContext context) {
final data = ModalRoute.of(context)!.settings;
late String photoUrl;
if (data.arguments == null) {
photoUrl = "empty";
} else {
photoUrl = data.arguments as String;
}
...
Text('photoUrl')