runtimeJson<TRuntime> method

TRuntime runtimeJson<TRuntime>({
  1. required TRuntime decode(
    1. Map<String, dynamic> payload
    ),
  2. String? typeName,
})

Decodes the runtime metadata payload with a JSON decoder.

Implementation

TRuntime runtimeJson<TRuntime>({
  required TRuntime Function(Map<String, dynamic> payload) decode,
  String? typeName,
}) {
  return PayloadCodec<TRuntime>.json(
    decode: decode,
    typeName: typeName,
  ).decode(runtime);
}