diff --git a/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/component/XComponentStruct.ets b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/component/XComponentStruct.ets index d8198a8b32cddbc18ae63f0dbcf2cefbf6935939..528de305e1ea81c71abfa2eb2c0b13ab4e11be91 100644 --- a/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/component/XComponentStruct.ets +++ b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/component/XComponentStruct.ets @@ -21,7 +21,7 @@ struct XComponentStruct { dvModelParams: DVModelParameters = new DVModelParameters(); build() { - XComponent({ id: (this.dvModelParams as Record)["xComponentId"], type: XComponentType.TEXTURE, libraryname: 'flutter'}) + XComponent({ id: (this.dvModelParams as Record)["xComponentId"], type: XComponentType.SURFACE, libraryname: 'flutter'}) .onLoad((context) => { this.context = context; }) 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 e29e877c56c919d1c3249469efb1b3fb1c3bf0fd..ea0d42c51457f4c3308fb41ee6ad1f0b93c492a6 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 @@ -46,7 +46,7 @@ export struct FlutterPage { build() { Stack() { - XComponent({ id: this.viewId, type: XComponentType.TEXTURE, libraryname: 'flutter' }) + XComponent({ id: this.viewId, type: XComponentType.SURFACE, libraryname: 'flutter' }) .focusable(true) .onLoad((context) => { this.flutterView?.onSurfaceCreated()