diff --git a/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/plugin/PlatformPlugin.ets b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/plugin/PlatformPlugin.ets index fd835762802d6dc9003da529ffd91cccde64e062..9ee0cdf78e2acbc6f55c2f99e7d98f4caff916b3 100644 --- a/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/plugin/PlatformPlugin.ets +++ b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/plugin/PlatformPlugin.ets @@ -200,18 +200,20 @@ export default class PlatformPlugin { private setSystemChromeSystemUIOverlayStyle(systemChromeStyle: SystemChromeStyle): void { let isStatusBarLightIconValue: boolean = false; - let statusBarColorValue:string = null; - let statusBarContentColorValue: string = null; - let navigationBarColorValue: string = null; + let statusBarColorValue: string = undefined; + let statusBarContentColorValue: string = undefined; + let navigationBarColorValue: string = undefined; let isNavigationBarLightIconValue: boolean = false; - let navigationBarContentColorValue: string = null; + let navigationBarContentColorValue: string = undefined; if(systemChromeStyle.statusBarIconBrightness != null) { switch (systemChromeStyle.statusBarIconBrightness) { case Brightness.DARK: isStatusBarLightIconValue = false; + statusBarContentColorValue = '#000000'; break; case Brightness.LIGHT: isStatusBarLightIconValue = true; + statusBarContentColorValue = '#ffffff'; break; } } @@ -242,7 +244,7 @@ export default class PlatformPlugin { } this.currentTheme = systemChromeStyle; - let systemBarProperties = { + let systemBarProperties: window.SystemBarProperties = { statusBarColor: statusBarColorValue, isStatusBarLightIcon: isStatusBarLightIconValue, statusBarContentColor: statusBarContentColorValue,