getArgs<T> static method
Implementation
static T? getArgs<T>(BuildContext context) {
try {
Object? args = ModalRoute.of(context)?.settings.arguments;
if (args is T) return args;
return null;
} catch (e) {
throw RouteException(
"Use getArgs in onReady state. Don't use in constructor or initState");
}
}