Enable the admin theme for your custom route
Issue:
You are registering a new route and would like it to be displayed using the administrative theme.
Solution:
To enable the admin theme on your custom route, you can add it as option in your routing.yml file. But keep in mind that this will only work for users that have permission to use the admin theme!
See the Drupal documentation for further information.