getArgumentFormMap<T> static method

T? getArgumentFormMap<T>(
  1. BuildContext context,
  2. String key
)

Implementation

static T? getArgumentFormMap<T>(BuildContext context, String key) {
  var argument = ModalRoute.of(context)!.settings.arguments;
  if (argument == null || argument is! Map) {
    return null;
  }
  Map<String, Object?> argMap = argument as Map<String, Object?>;
  return argMap[key] as T?;
}