findIndex method

int? findIndex(
  1. String name
)

Implementation

int? findIndex(String name) {
  for (var i = 0; i < arguments.length; i++) {
    String arg = arguments[i];
    if (arg == name) {
      try {
        return i;
      } catch (e) {
        return null;
      }
    }
  }
  return null;
}