key property

String? get key

The last segment of the path, or null at the root.

Implementation

String? get key => spec.path.back?.name;