Switch themes by taxonomy terms or nodes

I have a site built from Drupal which contains many sub channels (defined by taxonomy terms), and each sub channel may need to use a different theme. I see there is a module called ThemeKey which may be able to do this, but unfortunately it is currently not working on Drupal 8.

I see a solution which is to implement ThemeNegotiatorInterface, so I tried to create a custom module named custom_theme, then added a custom_theme.services.yml with the following lines:

services:
  custom_theme.theme_negotiator:
    class: Drupalcustom_themeThemeCustomThemeNegotiator
    tags:
      - { name: theme_negotiator, priority: 1000 }

Then I created the class file CustomThemeNegotiator.php and implemented the interface with some simple code.

namespace Drupalcustom_themeTheme;

use DrupaltaxonomyEntityTerm;

class CustomThemeNegotiator implements ThemeNegotiatorInterface {
  /**
   * {@inheritdoc}
   */
  public function applies(RouteMatchInterface $route_match) {
    $route = $route_match->getRouteObject();
    dpm($route);
    return TRUE;
  }

  /**
   * {@inheritdoc}
   */
  public function determineActiveTheme(RouteMatchInterface $route_match) {
    return "Seven";
  }
}

Finally I put the entire module to Drupal’s folder and then installed it in the admin console. However, it seems that the class is not called by Drupal, because I do not see the expected output generated by dpm(). Does anyone have an idea about why the class is not called?

Drupal version: 


Source: https://www.drupal.org/taxonomy/term/4/feed