argumentIndex property

int get argumentIndex

The argument index, or -1 when the path is empty.

Implementation

int get argumentIndex => path.isNotEmpty && path.first is int ? path.first as int : -1;