oobMessageFromUrl function
Converts Out-of-band message url url
to OutOfBand message object.
Implementation
OutOfBandMessage oobMessageFromUrl(String url) {
var asUri = Uri.parse(url);
if (asUri.queryParameters.containsKey('_oob')) {
return OutOfBandMessage.fromJson(utf8.decode(
base64Decode(addPaddingToBase64(asUri.queryParameters['_oob']!))));
} else {
throw Exception('No Out-Of-Band Message found');
}
}