encodeValue method Null safety

String encodeValue(
  1. String encoderKey,
  2. String value
)

Implementation

String encodeValue(String encoderKey, String value) {
  if (!encoderMap.containsKey(encoderKey)) {
    throw ArgumentError('No encoder to match the $encoderKey');
  }

  final encoder = encoderMap[encoderKey]!;
  return '$encoderKey${encoder.encode(value)}';
}