getConsumer method

TextsConsumer getConsumer(
  1. String destinationKey
)

Implementation

TextsConsumer getConsumer(String destinationKey) {
  var configuration = textsConfig.get(destinationKey);

  switch (destinationKey) {
    case destinationLog:
      return LogConsumer();
    case destinationApp:
      return AppTextsConsumer.fromConfiguration(configuration);
    default:
      throw 'Destination $destinationKey is unknown!';
  }
}