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 e9d66ef987b8c8f070bb6279a2035fc06fc8c054..d8198a8b32cddbc18ae63f0dbcf2cefbf6935939 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: 'texture', libraryname: 'flutter'}) + XComponent({ id: (this.dvModelParams as Record)["xComponentId"], type: XComponentType.TEXTURE, 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 483813fa6ae5e97b4b79abf9c8748ecdac90eebb..53e7ef62d1d0724238bbdf4e2cfe58bf1de4eb64 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: 'texture', libraryname: 'flutter' }) + XComponent({ id: this.viewId, type: XComponentType.TEXTURE, libraryname: 'flutter' }) .focusable(true) .onLoad((context) => { this.flutterView?.onSurfaceCreated()