enterLiveKitScene method

void enterLiveKitScene(
  1. BuildContext context, {
  2. ThemeType targetTheme = ThemeType.dark,
})

Called when entering LiveKit scene. context is used to get ThemeState. targetTheme is the target theme, defaults to dark.

Implementation

void enterLiveKitScene(BuildContext context, {ThemeType targetTheme = ThemeType.dark}) {
  _referenceCount++;
  _targetThemeType = targetTheme;

  if (_referenceCount == 1) {
    _themeState = BaseThemeProvider.of(context);
    _previousThemeType = _themeState?.currentType;
    _isPaused = false;

    if (_themeState != null) {
      _safeSetThemeMode(_themeState!, targetTheme);
    }
  }
}