getArgs<T> static method
getArgs Get the arguments from the current route
context
The context to get the arguments- Param
key
The key to get the arguments - Example:
BaseNavigation.getArgs(context, key: 'id');
Implementation
static T getArgs<T>(BuildContext context, {required String key}) {
return (ModalRoute.of(context)!.settings.arguments
as Map<String, dynamic>)[key] as T;
}