encodeRecap static method

String encodeRecap(
  1. Map<String, dynamic> recap
)

Implementation

static String encodeRecap(Map<String, dynamic> recap) {
  isValidRecap(recap);
  final jsonRecap = jsonEncode(recap);
  final bytes = utf8.encode(jsonRecap).toList();
  // remove the padding from the base64 string as per recap spec
  return 'urn:recap:${base64.encode(bytes).replaceAll('=', '')}';
}