From 53144d92e868c3609d5dffbc0626256b50d02bff Mon Sep 17 00:00:00 2001 From: hezhengyi Date: Sat, 4 Jan 2025 11:52:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E7=BB=99FlutterPage=E4=B8=AD?= =?UTF-8?q?=E7=9A=84XComponent=E7=BB=84=E4=BB=B6=E8=AE=BE=E7=BD=AEexpandSa?= =?UTF-8?q?feArea=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hezhengyi --- .../flutter/src/main/ets/embedding/ohos/FlutterPage.ets | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/ohos/FlutterPage.ets b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/ohos/FlutterPage.ets index 533e1e6a51..f43247a21e 100644 --- a/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/ohos/FlutterPage.ets +++ b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/ohos/FlutterPage.ets @@ -26,6 +26,8 @@ export const OHOS_FLUTTER_PAGE_UPDATE = "ohos_flutter_page_update"; */ @Component export struct FlutterPage { + @Prop safeAreaEdges: SafeAreaEdge[] | undefined = []; + @Prop safeAreaTypes: SafeAreaType[] | undefined = []; @Prop viewId: string = "" @Prop xComponentType: XComponentType = XComponentType.SURFACE @@ -64,6 +66,7 @@ export struct FlutterPage { }) .renderFit(RenderFit.TOP_LEFT) .backgroundColor(Color.Transparent) + .expandSafeArea(this.safeAreaTypes, this.safeAreaEdges) if (this.showSplashScreen) { this.splashScreenView(); @@ -144,6 +147,7 @@ export struct FlutterPage { }) .renderFit(RenderFit.TOP_LEFT) .backgroundColor(Color.Transparent) + .expandSafeArea(this.safeAreaTypes, this.safeAreaEdges) if (this.showSplashScreen) { this.splashScreenView(); -- Gitee