Obtain the currently active theme at render timeSource:
Intended for advanced use by developers to obtain the currently active theme
at render time and primarily for implementing themable widgets that can't
otherwise be themed via
This function should generally only be called at print/render time. For example:
Inside of a
Calling this function at print/render time is important because it does different things based on the context in which it's called:
If a reactive context is active,
session$getCurrentTheme()is called (which is a reactive read).
If no reactive context is active,
shiny::getCurrentTheme()is called (which returns the current app's
theme, if relevant).