I am trying to implement theme change signal in my extension. But when I am accessing theme using themeManager I am getting null.
Below is the example of the code:
import {
JupyterFrontEnd,
JupyterFrontEndPlugin
} from '@jupyterlab/application';
import { IThemeManager } from '@jupyterlab/apputils';
/**
* Initialization data for the myextension extension.
*/
const plugin: JupyterFrontEndPlugin<void> = {
id: 'myextension:plugin',
description: 'A JupyterLab extension.',
autoStart: true,
activate,
requires: [IThemeManager],
};
export default plugin;
async function activate(
app: JupyterFrontEnd,
themeManager: IThemeManager | null,
)
{
console.log('JupyterLab extension myextension is activated!101');
if (themeManager) {
console.log("Theme name: ", themeManager.theme);
}
}