The error is when I try to use the ModalRoute.of(context).settings.arguments I get an error. Also I want to save it in a map but can't.
Map data = {};
data = ModalRoute.of(context).settings.arguments; // this is the error;
Error: A value of type 'Object?' can't be assigned to a variable of type 'Map<dynamic, dynamic>'.
- 'Object' is from 'dart:core'.
- 'Map' is from 'dart:core'. data = ModalRoute.of(context).settings.arguments;