parseKnownPayload function

Future<KnownPayload?> parseKnownPayload(
  1. String payload
)

Parse payload and return KnownPayload or throws error

Implementation

Future<KnownPayload?> parseKnownPayload(String payload) async {
  final res = await createLib().parseKnownPayload(payload: payload);
  final decoded = jsonDecode(res);
  if (decoded == null) return null;
  return KnownPayload.fromJson(decoded);
}