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 533e1e6a510b7b6b002088b4121dfa5f5a2d09b1..f43247a21e77e5c289e9b6ecdd44641e5efa3a54 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();