# keyType<K> abstract method

Class<K>? keyType<K>()

Gets the key type for map-like generic classes.

Type Parameters:

- `K`: The expected key type for type safety

Returns:

- A Class<K> representing the key type if this is a map/pair
- `null` if type information is unavailable
- `Class<dynamic>` if not a map-like type

Example:

    final keyType = GenericClass(Map<String, int>).keyType<String>();

## Implementation

    Class<K>? keyType<K>();