get method

String? get(
  1. String name
)

Gets an argument by value

The name parameter is the name of the argument e.g. '--file' without the '--' prefix, for example:

var argy = Argy(arguments: myArgs);
argy.get('file'); // gets value of '--file' argument

Implementation

String? get(String name) {
  for (final argMap in parsedArgs) {
    if (argMap.containsKey(name)) {
      return argMap[name];
    }
  }
  return null;
}