From a164bf3c42da04582c24289f8d22acc50b8efa50 Mon Sep 17 00:00:00 2001 From: zhoujiaying Date: Fri, 15 Dec 2023 09:36:14 +0800 Subject: [PATCH 1/5] =?UTF-8?q?component=20engine=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhoujiaying --- .../embedding/ohos/FlutterAbilityDelegate.ets | 31 ++++++++++++------- shell/platform/ohos/ohos_touch_processor.cpp | 7 +++-- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/ohos/FlutterAbilityDelegate.ets b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/ohos/FlutterAbilityDelegate.ets index 31a454eb7e..d7bfe2805e 100644 --- a/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/ohos/FlutterAbilityDelegate.ets +++ b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/ohos/FlutterAbilityDelegate.ets @@ -54,9 +54,13 @@ class FlutterAbilityDelegate implements ExclusiveAppComponent { private isFlutterEngineFromHost: boolean = false; private engineGroup?: FlutterEngineGroup; private settings?: Settings; + private isHost:boolean = false; - constructor(host: Host) { + constructor(host?: Host) { this.host = host; + if (this.host) { + this.isHost = true; + } } /** @@ -99,9 +103,10 @@ class FlutterAbilityDelegate implements ExclusiveAppComponent { let initialRoute = this.host?.getInitialRoute(); if (initialRoute == null && this.host != null) { initialRoute = this.maybeGetInitialRouteFromIntent(this.host.getWant()); - if (initialRoute == null) { - initialRoute = FlutterAbilityLaunchConfigs.DEFAULT_INITIAL_ROUTE; - } + + } + if (initialRoute == null) { + initialRoute = FlutterAbilityLaunchConfigs.DEFAULT_INITIAL_ROUTE; } const libraryUri = this.host?.getDartEntrypointLibraryUri(); Log.d(TAG, "Executing Dart entrypoint: " + this.host?.getDartEntrypointFunctionName() + ", library uri: " + libraryUri == null ? "\"\"" : libraryUri + ", and sending initial route: " + initialRoute); @@ -197,9 +202,10 @@ class FlutterAbilityDelegate implements ExclusiveAppComponent { "No preferred FlutterEngine was provided. Creating a new FlutterEngine for this FlutterAbility."); let group = this.engineGroup; - if (group == null && this.context != null && this.host != null) { + if (group == null && this.context != null) { group = new FlutterEngineGroup(); - await group.checkLoader(this.context, this.host.getFlutterShellArgs().toArray() ?? []); + const flutterShellArgs = this.host? this.host.getFlutterShellArgs(): new FlutterShellArgs(); + await group.checkLoader(this.context, flutterShellArgs.toArray() ?? []); this.engineGroup = group; } if (this.context) { @@ -222,13 +228,13 @@ class FlutterAbilityDelegate implements ExclusiveAppComponent { let initialRoute = this.host?.getInitialRoute(); if (initialRoute == null && this.host != null) { initialRoute = this.maybeGetInitialRouteFromIntent(this.host.getWant()); - if (initialRoute == null) { - initialRoute = FlutterAbilityLaunchConfigs.DEFAULT_INITIAL_ROUTE; - } + } + if (initialRoute == null) { + initialRoute = FlutterAbilityLaunchConfigs.DEFAULT_INITIAL_ROUTE; } return options .setDartEntrypoint(dartEntrypoint) - .setInitialRoute(initialRoute ?? '') + .setInitialRoute(initialRoute) .setDartEntrypointArgs(this.host?.getDartEntrypointArgs() ?? []); } @@ -314,6 +320,9 @@ class FlutterAbilityDelegate implements ExclusiveAppComponent { */ shouldDispatchAppLifecycleState(): boolean { + if (!this.isHost) { + return this.isAttached; + } if (this.host == null) { return false; } @@ -321,7 +330,7 @@ class FlutterAbilityDelegate implements ExclusiveAppComponent { } ensureAlive() { - if (this.host == null) { + if (this.isHost && this.host == null) { throw new Error("Cannot execute method on a destroyed FlutterAbilityDelegate."); } } diff --git a/shell/platform/ohos/ohos_touch_processor.cpp b/shell/platform/ohos/ohos_touch_processor.cpp index 202f07ddb9..eacf431cfe 100644 --- a/shell/platform/ohos/ohos_touch_processor.cpp +++ b/shell/platform/ohos/ohos_touch_processor.cpp @@ -79,8 +79,8 @@ void OhosTouchProcessor::HandleTouchEvent( touchEvent->touchPoints[index].timeStamp / MSEC_PER_SECOND; pointerData.change = getPointerChangeForAction(touchEvent->touchPoints[index].type); - pointerData.physical_y = touchEvent->touchPoints[index].screenY; - pointerData.physical_x = touchEvent->touchPoints[index].screenX; + pointerData.physical_y = touchEvent->touchPoints[index].y; + pointerData.physical_x = touchEvent->touchPoints[index].x; // Delta will be generated in pointer_data_packet_converter.cc. pointerData.physical_delta_x = 0.0; pointerData.physical_delta_y = 0.0; @@ -123,6 +123,9 @@ void OhosTouchProcessor::HandleTouchEvent( LOGD("Touch Info : screenx = %{public}f, screeny = %{public}f", touchEvent->touchPoints[index].screenX, touchEvent->touchPoints[index].screenY); + LOGD("Touch Info pointerData : x = %{public}f, y = %{public}f", + pointerData.physical_x, + pointerData.physical_y); LOGD( "vtimeStamp = %{public}ld, isPressed = %{public}d toolType = " "%{public}d", -- Gitee From 24fb9df7df4b175e59b3bdc3551216aab005ea46 Mon Sep 17 00:00:00 2001 From: zhoujiaying Date: Tue, 19 Dec 2023 10:28:33 +0800 Subject: [PATCH 2/5] =?UTF-8?q?component=20engine=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhoujiaying --- .../ohos/FlutterComopnentDelegate.ets | 146 ++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/ohos/FlutterComopnentDelegate.ets diff --git a/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/ohos/FlutterComopnentDelegate.ets b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/ohos/FlutterComopnentDelegate.ets new file mode 100644 index 0000000000..2f0a43b091 --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/ohos/FlutterComopnentDelegate.ets @@ -0,0 +1,146 @@ +import common from '@ohos.app.ability.common'; +import { FlutterAbilityDelegate } from './FlutterAbilityDelegate'; +import window from '@ohos.window'; +import { ViewportMetrics } from './FlutterAbility'; +import { + BuilderParams, + DVModel, DVModelChildren, DVModelEvents, DVModelParameters } from '../../view/DynamicView/dynamicView'; +import display from '@ohos.display'; +import { RootDvModeManager } from '../../plugin/platform/RootDvModelManager'; +import { FlutterPlugin } from '../engine/plugins/FlutterPlugin'; + +export class FlutterComponentDelegate { + private context:common.UIAbilityContext + private delegate?: FlutterAbilityDelegate | null; + private mainWindow?: window.Window; + private viewportMetrics = new ViewportMetrics(); + + constructor(context:common.UIAbilityContext) { + this.context = context; + this.delegate = new FlutterAbilityDelegate(); + } + + async init(): Promise { + let displayInfo = display.getDefaultDisplaySync(); + this.viewportMetrics.devicePixelRatio = displayInfo?.densityPixels; + await this?.delegate?.onAttach(this.context); + this?.delegate?.platformPlugin?.setUIAbilityContext(this.context); + this?.delegate?.sendSettings(); + let params: DVModelParameters = new DVModelParameters(); + (params as Record)["xComponentId"] = + this.delegate?.getFlutterNapi()?.nativeShellHolderId?.toString(); + let xComponentModel: DVModel = + new DVModel("xComponent", params, new DVModelEvents(), new DVModelChildren(), BuildXComponentStruct); + RootDvModeManager.addDvModel(xComponentModel); + this.mainWindow = await window.getLastWindow(this.context); + this.mainWindow?.on('windowSizeChange', (data) => { + this.onWindowPropertiesUpdated(); + }); + + this.mainWindow?.on('avoidAreaChange', (data) => { + this.onWindowPropertiesUpdated(); + }); + + this.mainWindow?.on('keyboardHeightChange', (data) => { + this.onWindowPropertiesUpdated(); + }); + this.onWindowPropertiesUpdated(); + this?.delegate?.onWindowStageCreate(); + this?.delegate?.onWindowFocusChanged(true); + this?.delegate?.onForeground(); + } + + private onWindowPropertiesUpdated(){ + if (this.delegate == null || !this.delegate.isAttached) { + return; + } + let systemAvoidArea = this.mainWindow?.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM); + let gestureAvoidArea = this.mainWindow?.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM_GESTURE); + let keyboardAvoidArea = this.mainWindow?.getWindowAvoidArea(window.AvoidAreaType.TYPE_KEYBOARD); + const properties = this.mainWindow?.getWindowProperties(); + if (properties!.windowRect.width < this.viewportMetrics.physicalWidth) { + this.viewportMetrics.physicalWidth = properties!.windowRect.width; + } + if (properties!.windowRect.height < this.viewportMetrics.physicalHeight) { + this.viewportMetrics.physicalHeight = properties!.windowRect.height; + + + } + + this.viewportMetrics.physicalViewPaddingTop = systemAvoidArea!.topRect.height + this.viewportMetrics.physicalViewPaddingLeft = systemAvoidArea!.leftRect.width + this.viewportMetrics.physicalViewPaddingBottom = systemAvoidArea!.bottomRect.height + this.viewportMetrics.physicalViewPaddingRight = systemAvoidArea!.rightRect.width + + this.viewportMetrics.physicalViewInsetTop = keyboardAvoidArea!.topRect.height + this.viewportMetrics.physicalViewInsetLeft = keyboardAvoidArea!.leftRect.width + this.viewportMetrics.physicalViewInsetBottom = keyboardAvoidArea!.bottomRect.height + this.viewportMetrics.physicalViewInsetRight = keyboardAvoidArea!.rightRect.width + + this.viewportMetrics.systemGestureInsetTop = gestureAvoidArea!.topRect.height + this.viewportMetrics.systemGestureInsetLeft = gestureAvoidArea!.leftRect.width + this.viewportMetrics.systemGestureInsetBottom = gestureAvoidArea!.bottomRect.height + this.viewportMetrics.systemGestureInsetRight = gestureAvoidArea!.rightRect.width + + this.updateViewportMetrics() + } + + private updateViewportMetrics() { + this?.delegate?.getFlutterNapi()?.setViewportMetrics(this.viewportMetrics.devicePixelRatio, + this.viewportMetrics.physicalWidth, + this.viewportMetrics.physicalHeight, + this.viewportMetrics.physicalViewPaddingTop, + this.viewportMetrics.physicalViewPaddingRight, + this.viewportMetrics.physicalViewPaddingBottom, + this.viewportMetrics.physicalViewPaddingLeft, + this.viewportMetrics.physicalViewInsetTop, + this.viewportMetrics.physicalViewInsetRight, + this.viewportMetrics.physicalViewInsetBottom, + this.viewportMetrics.physicalViewInsetLeft, + this.viewportMetrics.systemGestureInsetTop, + this.viewportMetrics.systemGestureInsetRight, + this.viewportMetrics.systemGestureInsetBottom, + this.viewportMetrics.systemGestureInsetLeft, + this.viewportMetrics.physicalTouchSlop, + new Array(0), + new Array(0), + new Array(0)) + } + + addPlugin(plugin: FlutterPlugin): void { + this.delegate?.addPlugin(plugin) + } + + release():void { + if (this?.delegate != null) { + this?.delegate?.onDestroy(); + this?.delegate?.release(); + this.delegate = null; + } + } + + updateView(width:number, height:number):void { + this.viewportMetrics.physicalWidth = width; + this.viewportMetrics.physicalHeight = height; + this.updateViewportMetrics(); + } +} + +@Component +struct XComponentStruct { + private context:ESObject; + dvModelParams: DVModelParameters = new DVModelParameters(); + + build() { + XComponent({ id: (this.dvModelParams as Record)["xComponentId"], type: 'texture', libraryname: 'flutter'}) + .onLoad((context) => { + this.context = context; + }) + .onDestroy(() => { + }) + } +} + +@Builder function BuildXComponentStruct(buildParams: BuilderParams) { + XComponentStruct({dvModelParams: buildParams.params}); +} \ No newline at end of file -- Gitee From bf9a8d552af44f3c6344c8e8f881161a1e3d8417 Mon Sep 17 00:00:00 2001 From: zhoujiaying Date: Tue, 19 Dec 2023 11:11:21 +0800 Subject: [PATCH 3/5] =?UTF-8?q?component=20engine=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhoujiaying --- .../embedding/ohos/FlutterComopnentDelegate.ets | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/ohos/FlutterComopnentDelegate.ets b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/ohos/FlutterComopnentDelegate.ets index 2f0a43b091..b6636022cc 100644 --- a/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/ohos/FlutterComopnentDelegate.ets +++ b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/ohos/FlutterComopnentDelegate.ets @@ -1,3 +1,18 @@ +/* +* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd. +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + import common from '@ohos.app.ability.common'; import { FlutterAbilityDelegate } from './FlutterAbilityDelegate'; import window from '@ohos.window'; -- Gitee From c6658104d99b19a5acabc5629e4adff699e8616b Mon Sep 17 00:00:00 2001 From: zhoujiaying Date: Thu, 21 Dec 2023 14:50:58 +0800 Subject: [PATCH 4/5] =?UTF-8?q?component=20engine=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhoujiaying --- .../main/ets/component/XComponentStruct.ets | 18 ++++++ .../ohos/FlutterComopnentDelegate.ets | 56 ++++++++----------- shell/platform/ohos/ohos_touch_processor.cpp | 18 ------ 3 files changed, 42 insertions(+), 50 deletions(-) create mode 100644 shell/platform/ohos/flutter_embedding/flutter/src/main/ets/component/XComponentStruct.ets 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 new file mode 100644 index 0000000000..f4f1b0402b --- /dev/null +++ b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/component/XComponentStruct.ets @@ -0,0 +1,18 @@ +@Component +struct XComponentStruct { + private context:ESObject; + dvModelParams: DVModelParameters = new DVModelParameters(); + + build() { + XComponent({ id: (this.dvModelParams as Record)["xComponentId"], type: 'texture', libraryname: 'flutter'}) + .onLoad((context) => { + this.context = context; + }) + .onDestroy(() => { + }) + } +} + +@Builder export function BuildXComponentStruct(buildParams: BuilderParams) { + XComponentStruct({dvModelParams: buildParams.params}); +} \ No newline at end of file diff --git a/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/ohos/FlutterComopnentDelegate.ets b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/ohos/FlutterComopnentDelegate.ets index b6636022cc..7cec8a4a5d 100644 --- a/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/ohos/FlutterComopnentDelegate.ets +++ b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/ohos/FlutterComopnentDelegate.ets @@ -19,18 +19,26 @@ import window from '@ohos.window'; import { ViewportMetrics } from './FlutterAbility'; import { BuilderParams, - DVModel, DVModelChildren, DVModelEvents, DVModelParameters } from '../../view/DynamicView/dynamicView'; + DVModel, + DVModelChildren, + DVModelEvents, + DVModelParameters +} from '../../view/DynamicView/dynamicView'; import display from '@ohos.display'; import { RootDvModeManager } from '../../plugin/platform/RootDvModelManager'; import { FlutterPlugin } from '../engine/plugins/FlutterPlugin'; +import { BuildXComponentStruct } from '../../component/XComponentStruct'; export class FlutterComponentDelegate { - private context:common.UIAbilityContext + private context: common.UIAbilityContext + private delegate?: FlutterAbilityDelegate | null; + private mainWindow?: window.Window; + private viewportMetrics = new ViewportMetrics(); - constructor(context:common.UIAbilityContext) { + constructor(context: common.UIAbilityContext) { this.context = context; this.delegate = new FlutterAbilityDelegate(); } @@ -48,15 +56,18 @@ export class FlutterComponentDelegate { new DVModel("xComponent", params, new DVModelEvents(), new DVModelChildren(), BuildXComponentStruct); RootDvModeManager.addDvModel(xComponentModel); this.mainWindow = await window.getLastWindow(this.context); - this.mainWindow?.on('windowSizeChange', (data) => { + this.mainWindow?.on( + 'windowSizeChange', (data) => { this.onWindowPropertiesUpdated(); }); - this.mainWindow?.on('avoidAreaChange', (data) => { + this.mainWindow?.on( + 'avoidAreaChange', (data) => { this.onWindowPropertiesUpdated(); }); - this.mainWindow?.on('keyboardHeightChange', (data) => { + this.mainWindow?.on( + 'keyboardHeightChange', (data) => { this.onWindowPropertiesUpdated(); }); this.onWindowPropertiesUpdated(); @@ -65,7 +76,7 @@ export class FlutterComponentDelegate { this?.delegate?.onForeground(); } - private onWindowPropertiesUpdated(){ + private onWindowPropertiesUpdated() { if (this.delegate == null || !this.delegate.isAttached) { return; } @@ -78,8 +89,6 @@ export class FlutterComponentDelegate { } if (properties!.windowRect.height < this.viewportMetrics.physicalHeight) { this.viewportMetrics.physicalHeight = properties!.windowRect.height; - - } this.viewportMetrics.physicalViewPaddingTop = systemAvoidArea!.topRect.height @@ -101,7 +110,8 @@ export class FlutterComponentDelegate { } private updateViewportMetrics() { - this?.delegate?.getFlutterNapi()?.setViewportMetrics(this.viewportMetrics.devicePixelRatio, + this?.delegate?.getFlutterNapi()?.setViewportMetrics( + this.viewportMetrics.devicePixelRatio, this.viewportMetrics.physicalWidth, this.viewportMetrics.physicalHeight, this.viewportMetrics.physicalViewPaddingTop, @@ -119,14 +129,15 @@ export class FlutterComponentDelegate { this.viewportMetrics.physicalTouchSlop, new Array(0), new Array(0), - new Array(0)) + new Array(0) + ) } addPlugin(plugin: FlutterPlugin): void { this.delegate?.addPlugin(plugin) } - release():void { + release(): void { if (this?.delegate != null) { this?.delegate?.onDestroy(); this?.delegate?.release(); @@ -134,28 +145,9 @@ export class FlutterComponentDelegate { } } - updateView(width:number, height:number):void { + updateView(width: number, height: number): void { this.viewportMetrics.physicalWidth = width; this.viewportMetrics.physicalHeight = height; this.updateViewportMetrics(); } -} - -@Component -struct XComponentStruct { - private context:ESObject; - dvModelParams: DVModelParameters = new DVModelParameters(); - - build() { - XComponent({ id: (this.dvModelParams as Record)["xComponentId"], type: 'texture', libraryname: 'flutter'}) - .onLoad((context) => { - this.context = context; - }) - .onDestroy(() => { - }) - } -} - -@Builder function BuildXComponentStruct(buildParams: BuilderParams) { - XComponentStruct({dvModelParams: buildParams.params}); } \ No newline at end of file diff --git a/shell/platform/ohos/ohos_touch_processor.cpp b/shell/platform/ohos/ohos_touch_processor.cpp index eacf431cfe..47f8a838ff 100644 --- a/shell/platform/ohos/ohos_touch_processor.cpp +++ b/shell/platform/ohos/ohos_touch_processor.cpp @@ -114,24 +114,6 @@ void OhosTouchProcessor::HandleTouchEvent( pointerData.size = touchEvent->touchPoints[index].size; pointerData.scale = 1.0; pointerData.rotation = 0.0; - LOGD( - "Touch Info:dots[%{public}d] id %{public}d x = %{public}f, y = " - "%{public}f type %{public}d", - static_cast(index), touchEvent->touchPoints[index].id, - touchEvent->touchPoints[index].x, touchEvent->touchPoints[index].y, - touchEvent->touchPoints[index].type); - LOGD("Touch Info : screenx = %{public}f, screeny = %{public}f", - touchEvent->touchPoints[index].screenX, - touchEvent->touchPoints[index].screenY); - LOGD("Touch Info pointerData : x = %{public}f, y = %{public}f", - pointerData.physical_x, - pointerData.physical_y); - LOGD( - "vtimeStamp = %{public}ld, isPressed = %{public}d toolType = " - "%{public}d", - touchEvent->touchPoints[index].timeStamp, - touchEvent->touchPoints[index].isPressed, toolType); - packet->SetPointerData(index, pointerData); } auto ohos_shell_holder = reinterpret_cast(shell_holderID); -- Gitee From fd5f8bd11fe8f434f56137623ad4a1e76c8f80a9 Mon Sep 17 00:00:00 2001 From: zhoujiaying Date: Thu, 21 Dec 2023 14:51:53 +0800 Subject: [PATCH 5/5] =?UTF-8?q?component=20engine=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhoujiaying --- .../src/main/ets/component/XComponentStruct.ets | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 f4f1b0402b..e9d66ef987 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 @@ -1,3 +1,20 @@ +/* +* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd. +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import { BuilderParams, DVModelParameters } from '../view/DynamicView/dynamicView'; + @Component struct XComponentStruct { private context:ESObject; -- Gitee