From 96443e93afb444534f463ca5afe896ff8be5d6d3 Mon Sep 17 00:00:00 2001 From: gtbluesky Date: Fri, 20 Oct 2023 15:59:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=8A=B6=E6=80=81=E6=A0=8F?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E9=A2=9C=E8=89=B2=E6=97=A0=E6=B3=95=E8=87=AA?= =?UTF-8?q?=E9=80=82=E5=BA=94=E6=94=B9=E5=8F=98=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: gtbluesky --- .../flutter/src/main/ets/plugin/PlatformPlugin.ets | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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 fd83576280..9ee0cdf78e 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, -- Gitee