whatsNext abstract method

DecodingType whatsNext(
  1. String key, {
  2. int? id,
})

Returns the actual or preferred DecodingType of the encoded data for the given key or id.

Self-describing formats may return a DecodingType that indicates the type of the encoded data, or the preferred way of decoding it.

Non-self-describing formats may only return DecodingType.unknown for all types. In this case, the Decodable implementation must try the appropriate decoding method based on the expected type.

Implementation

DecodingType whatsNext(String key, {int? id});