field<T> method
Reads key from Session.additionalFields, casting to T.
Returns null for an absent key. Throws if the key exists but its value
is not assignable to T.
Implementation
T? field<T>(String key, {T Function(Object? value)? decode}) =>
_readAdditionalField(additionalFields, key, decode: decode);