Method GetState
GetState<T>(string, T)
Retrieves a value from the context state.
public T GetState<T>(string key, T defaultValue = default)
Parameters
keystringThe state key.
defaultValueTThe default value if the key is not found.
Returns
- T
The stored value, or the default if not found.
Type Parameters
TThe expected type of the value.