newArgResults function Null safety

ArgResults newArgResults(
  1. ArgParser parser,
  2. Map<String, dynamic> parsed,
  3. String? name,
  4. ArgResults? command,
  5. List<String> rest,
  6. List<String> arguments

Creates a new ArgResults.

Since ArgResults doesn't have a public constructor, this lets ArgParser get to it. This function isn't exported to the public API of the package.


ArgResults newArgResults(
    ArgParser parser,
    Map<String, dynamic> parsed,
    String? name,
    ArgResults? command,
    List<String> rest,
    List<String> arguments) {
  return ArgResults._(parser, parsed, name, command, rest, arguments);