canHandle method

bool canHandle(
  1. TranslateRequest request
)

Whether this handler can handle the given request.

Implementation

bool canHandle(TranslateRequest request) => supportedLanguages.any(
      (language) => language.toLowerCase() == request.to.toLowerCase(),
    );