{
+ return Array.from(this.args);
+ }
+}
\ No newline at end of file
diff --git a/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/dart/DartExecutor.ets b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/dart/DartExecutor.ets
new file mode 100644
index 0000000000000000000000000000000000000000..46d08cd458b5795d1daaa1f4379a088b129d5dc7
--- /dev/null
+++ b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/dart/DartExecutor.ets
@@ -0,0 +1,379 @@
+/*
+* 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 resourceManager from '@ohos.resourceManager';
+import FlutterInjector from '../../../FlutterInjector';
+import { BinaryMessageHandler, BinaryReply, TaskQueue, TaskQueueOptions } from '../../../plugin/common/BinaryMessenger';
+import { BinaryMessenger } from '../../../plugin/common/BinaryMessenger';
+import StringCodec from '../../../plugin/common/StringCodec';
+import Log from '../../../util/Log';
+import { TraceSection } from '../../../util/TraceSection';
+import { FlutterCallbackInformation } from '../../../view/FlutterCallbackInformation';
+import FlutterNapi from '../FlutterNapi';
+import { DartMessenger } from './DartMessenger';
+
+
+const TAG = "DartExecutor";
+
+/**
+ * dart代码执行器
+ */
+export default class DartExecutor implements BinaryMessenger {
+ flutterNapi: FlutterNapi;
+ assetManager: resourceManager.ResourceManager;
+ private dartMessenger: DartMessenger;
+ private binaryMessenger: BinaryMessenger;
+ private isApplicationRunning: boolean = false;
+ private isolateServiceId: String = "";
+ private isolateServiceIdListener: IsolateServiceIdListener | null = null;
+
+ private isolateChannelMessageHandler: BinaryMessageHandler =
+ new IsolateChannelMessageHandler(this.isolateServiceId, this.isolateServiceIdListener);
+
+ constructor(flutterNapi: FlutterNapi, assetManager: resourceManager.ResourceManager) {
+ this.flutterNapi = flutterNapi;
+ this.assetManager = assetManager;
+ this.dartMessenger = new DartMessenger(flutterNapi);
+ this.dartMessenger.setMessageHandler("flutter/isolate", this.isolateChannelMessageHandler);
+ this.binaryMessenger = new DefaultBinaryMessenger(this.dartMessenger);
+ // The JNI might already be attached if coming from a spawned engine. If so, correctly report
+ // that this DartExecutor is already running.
+ if (flutterNapi.isAttached()) {
+ this.isApplicationRunning = true;
+ }
+ }
+
+
+ /**
+ * Invoked when the {@link io.flutter.embedding.engine.FlutterEngine} that owns this {@link
+ * DartExecutor} attaches to JNI.
+ *
+ * When attached to JNI, this {@link DartExecutor} begins handling 2-way communication to/from
+ * the Dart execution context. This communication is facilitate via 2 APIs:
+ *
+ *
+ * - {@link BinaryMessenger}, which sends messages to Dart
+ *
- {@link PlatformMessageHandler}, which receives messages from Dart
+ *
+ */
+ onAttachedToNAPI(): void {
+ Log.d(TAG, "Attached to NAPI. Registering the platform message handler for this Dart execution context.");
+ this.flutterNapi.setPlatformMessageHandler(this.dartMessenger);
+ }
+
+ /**
+ * Invoked when the {@link io.flutter.embedding.engine.FlutterEngine} that owns this {@link
+ * DartExecutor} detaches from JNI.
+ *
+ * When detached from JNI, this {@link DartExecutor} stops handling 2-way communication to/from
+ * the Dart execution context.
+ */
+ onDetachedFromNAPI(): void {
+ Log.d(TAG, "Detached from NAPI. De-registering the platform message handler for this Dart execution context.");
+ this.flutterNapi.setPlatformMessageHandler(null);
+ }
+
+ /**
+ * Is this {@link DartExecutor} currently executing Dart code?
+ *
+ * @return true if Dart code is being executed, false otherwise
+ */
+ isExecutingDart(): boolean {
+ return this.isApplicationRunning;
+ }
+
+ /**
+ * Starts executing Dart code based on the given {@code dartEntrypoint} and the {@code
+ * dartEntrypointArgs}.
+ *
+ *
See {@link DartEntrypoint} for configuration options.
+ *
+ * @param dartEntrypoint specifies which Dart function to run, and where to find it
+ * @param dartEntrypointArgs Arguments passed as a list of string to Dart's entrypoint function.
+ */
+ executeDartEntrypoint(dartEntrypoint: DartEntrypoint, dartEntrypointArgs?: string[]): void {
+ if (this.isApplicationRunning) {
+ Log.w(TAG, "Attempted to run a DartExecutor that is already running.");
+ return;
+ }
+
+ TraceSection.begin("DartExecutor#executeDartEntrypoint");
+ try {
+ Log.d(TAG, "Executing Dart entrypoint: " + dartEntrypoint);
+ this.flutterNapi.runBundleAndSnapshotFromLibrary(
+ dartEntrypoint.pathToBundle,
+ dartEntrypoint.dartEntrypointFunctionName,
+ dartEntrypoint.dartEntrypointLibrary,
+ this.assetManager,
+ dartEntrypointArgs ?? []);
+
+ this.isApplicationRunning = true;
+ } finally {
+ TraceSection.end("DartExecutor#executeDartEntrypoint");
+ }
+ }
+
+ /**
+ * Starts executing Dart code based on the given {@code dartCallback}.
+ *
+ *
See {@link DartCallback} for configuration options.
+ *
+ * @param dartCallback specifies which Dart callback to run, and where to find it
+ */
+ executeDartCallback(dartCallback: DartCallback): void {
+ if (this.isApplicationRunning) {
+ Log.w(TAG, "Attempted to run a DartExecutor that is already running.");
+ return;
+ }
+
+ TraceSection.begin("DartExecutor#executeDartCallback");
+ try {
+ Log.d(TAG, "Executing Dart callback: " + dartCallback);
+ this.flutterNapi.runBundleAndSnapshotFromLibrary(
+ dartCallback.pathToBundle,
+ dartCallback.callbackHandle.callbackName,
+ dartCallback.callbackHandle.callbackLibraryPath,
+ dartCallback.resourceManager,
+ []);
+
+ this.isApplicationRunning = true;
+ } finally {
+ TraceSection.end("DartExecutor#executeDartCallback");
+ }
+ }
+
+ /**
+ * Returns a {@link BinaryMessenger} that can be used to send messages to, and receive messages
+ * from, Dart code that this {@code DartExecutor} is executing.
+ */
+
+ getBinaryMessenger(): BinaryMessenger {
+ return this.binaryMessenger;
+ }
+
+ makeBackgroundTaskQueue(options: TaskQueueOptions): TaskQueue {
+ return this.getBinaryMessenger().makeBackgroundTaskQueue(options);
+ }
+
+
+ send(channel: String, message: ArrayBuffer, callback?: BinaryReply): void {
+ this.getBinaryMessenger().send(channel, message, callback);
+ }
+
+ setMessageHandler(channel: String, handler: BinaryMessageHandler, taskQueue?: TaskQueue): void {
+ this.getBinaryMessenger().setMessageHandler(channel, handler, taskQueue);
+ }
+
+ enableBufferingIncomingMessages(): void {
+ this.getBinaryMessenger().enableBufferingIncomingMessages();
+ }
+
+
+ /**
+ * Returns the number of pending channel callback replies.
+ *
+ *
When sending messages to the Flutter application using {@link BinaryMessenger#send(String,
+ * ByteBuffer, io.flutter.plugin.common.BinaryMessenger.BinaryReply)}, developers can optionally
+ * specify a reply callback if they expect a reply from the Flutter application.
+ *
+ *
This method tracks all the pending callbacks that are waiting for response, and is supposed
+ * to be called from the main thread (as other methods). Calling from a different thread could
+ * possibly capture an indeterministic internal state, so don't do it.
+ *
+ *
Currently, it's mainly useful for a testing framework like Espresso to determine whether all
+ * the async channel callbacks are handled and the app is idle.
+ */
+ getPendingChannelResponseCount(): number {
+ return this.dartMessenger.getPendingChannelResponseCount();
+ }
+
+ /**
+ * Returns an identifier for this executor's primary isolate. This identifier can be used in
+ * queries to the Dart service protocol.
+ */
+
+ getIsolateServiceId(): String {
+ return this.isolateServiceId;
+ }
+
+
+
+ /**
+ * Set a listener that will be notified when an isolate identifier is available for this
+ * executor's primary isolate.
+ */
+ setIsolateServiceIdListener(listener: IsolateServiceIdListener): void {
+ this.isolateServiceIdListener = listener;
+ if (this.isolateServiceIdListener != null && this.isolateServiceId != null) {
+ this.isolateServiceIdListener.onIsolateServiceIdAvailable(this.isolateServiceId);
+ }
+ }
+
+ /**
+ * Notify the Dart VM of a low memory event, or that the application is in a state such that now
+ * is an appropriate time to free resources, such as going to the background.
+ *
+ *
This does not notify a Flutter application about memory pressure. For that, use the {@link
+ * io.flutter.embedding.engine.systemchannels.SystemChannel#sendMemoryPressureWarning}.
+ *
+ *
Calling this method may cause jank or latency in the application. Avoid calling it during
+ * critical periods like application startup or periods of animation.
+ */
+ notifyLowMemoryWarning(): void {
+ if (this.flutterNapi.isAttached()) {
+ this.flutterNapi.notifyLowMemoryWarning();
+ }
+ }
+
+ disableBufferingIncomingMessages(): void {
+ this.getBinaryMessenger().enableBufferingIncomingMessages();
+ }
+}
+
+
+/**
+ * Configuration options that specify which Dart entrypoint function is executed and where to find
+ * that entrypoint and other assets required for Dart execution.
+ */
+export class DartEntrypoint {
+ /** The path within the AssetManager where the app will look for assets. */
+ pathToBundle: string;
+
+ /** The library or file location that contains the Dart entrypoint function. */
+ dartEntrypointLibrary: string;
+
+ /** The name of a Dart function to execute. */
+ dartEntrypointFunctionName: string;
+
+ constructor(pathToBundle: string,
+ dartEntrypointLibrary: string,
+ dartEntrypointFunctionName: string) {
+ this.pathToBundle = pathToBundle;
+ this.dartEntrypointLibrary = dartEntrypointLibrary;
+ this.dartEntrypointFunctionName = dartEntrypointFunctionName;
+ }
+
+ static createDefault() {
+ const flutterLoader = FlutterInjector.getInstance().getFlutterLoader();
+ if (!flutterLoader.initialized) {
+ throw new Error(
+ "DartEntrypoints can only be created once a FlutterEngine is created.");
+ }
+ return new DartEntrypoint(flutterLoader.findAppBundlePath(), "", "main");
+ }
+}
+
+
+/** Callback interface invoked when the isolate identifier becomes available. */
+interface IsolateServiceIdListener {
+ onIsolateServiceIdAvailable(isolateServiceId: String): void;
+}
+
+
+/**
+ * Configuration options that specify which Dart callback function is executed and where to find
+ * that callback and other assets required for Dart execution.
+ */
+export class DartCallback {
+ /** Standard Android AssetManager, provided from some {@code Context} or {@code Resources}. */
+ public resourceManager: resourceManager.ResourceManager;
+
+ /** The path within the AssetManager where the app will look for assets. */
+ public pathToBundle: string;
+
+ /** A Dart callback that was previously registered with the Dart VM. */
+ public callbackHandle: FlutterCallbackInformation;
+
+ constructor(resourceManager: resourceManager.ResourceManager,
+ pathToBundle: string,
+ callbackHandle: FlutterCallbackInformation) {
+ this.resourceManager = resourceManager;
+ this.pathToBundle = pathToBundle;
+ this.callbackHandle = callbackHandle;
+ }
+
+ toString(): String {
+ return "DartCallback( bundle path: "
+ + this.pathToBundle
+ + ", library path: "
+ + this.callbackHandle.callbackLibraryPath
+ + ", function: "
+ + this.callbackHandle.callbackName
+ + " )";
+ }
+}
+
+export class DefaultBinaryMessenger implements BinaryMessenger {
+ private messenger: DartMessenger;
+
+ constructor(messenger: DartMessenger) {
+ this.messenger = messenger;
+ }
+
+ makeBackgroundTaskQueue(options: TaskQueueOptions): TaskQueue {
+ return this.messenger.makeBackgroundTaskQueue(options);
+ }
+
+ /**
+ * Sends the given {@code messages} from Android to Dart over the given {@code channel} and then
+ * has the provided {@code callback} invoked when the Dart side responds.
+ *
+ * @param channel the name of the logical channel used for the message.
+ * @param message the message payload, a direct-allocated {@link ByteBuffer} with the message
+ * bytes between position zero and current position, or null.
+ * @param callback a callback invoked when the Dart application responds to the message
+ */
+
+ send(channel: String, message: ArrayBuffer, callback?: BinaryReply): void {
+ this.messenger.send(channel, message, callback);
+ }
+
+ /**
+ * Sets the given {@link io.flutter.plugin.common.BinaryMessenger.BinaryMessageHandler} as the
+ * singular handler for all incoming messages received from the Dart side of this Dart execution
+ * context.
+ *
+ * @param channel the name of the channel.
+ * @param handler a {@link BinaryMessageHandler} to be invoked on incoming messages, or null.
+ */
+ setMessageHandler(channel: String, handler: BinaryMessageHandler, taskQueue?: TaskQueue): void {
+ this.messenger.setMessageHandler(channel, handler);
+ }
+
+ enableBufferingIncomingMessages(): void {
+ this.messenger.enableBufferingIncomingMessages();
+ }
+
+ disableBufferingIncomingMessages(): void {
+ this.messenger.disableBufferingIncomingMessages();
+ }
+}
+
+class IsolateChannelMessageHandler implements BinaryMessageHandler {
+ private isolateServiceId: String;
+ private isolateServiceIdListener: IsolateServiceIdListener | null = null;
+
+ constructor(isolateServiceId: String, isolateServiceIdListener: IsolateServiceIdListener | null) {
+ this.isolateServiceId = isolateServiceId;
+ this.isolateServiceIdListener = isolateServiceIdListener;
+ }
+
+ onMessage(message: ArrayBuffer, callback: BinaryReply): void {
+ this.isolateServiceId = StringCodec.INSTANCE.decodeMessage(message);
+ if (this.isolateServiceIdListener != null) {
+ this.isolateServiceIdListener.onIsolateServiceIdAvailable(this.isolateServiceId);
+ }
+ }
+}
\ No newline at end of file
diff --git a/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/dart/DartMessenger.ets b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/dart/DartMessenger.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6e9bfab834fbdc2b0929e774ecd94c78d4683e7a
--- /dev/null
+++ b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/dart/DartMessenger.ets
@@ -0,0 +1,288 @@
+/*
+* 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 Log from '../../../util/Log'
+import { BinaryMessageHandler, BinaryMessenger, BinaryReply, TaskQueue, TaskQueueOptions } from '../../../plugin/common/BinaryMessenger';
+import FlutterNapi from '../FlutterNapi';
+import { PlatformMessageHandler } from './PlatformMessageHandler';
+import { TraceSection } from '../../../util/TraceSection';
+
+/**
+ * Message conduit for 2-way communication between Android and Dart.
+ *
+ *
See {@link BinaryMessenger}, which sends messages from Android to Dart
+ *
+ *
See {@link PlatformMessageHandler}, which handles messages to Android from Dart
+ */
+
+const TAG = "DartMessenger";
+
+export class DartMessenger implements BinaryMessenger, PlatformMessageHandler {
+
+ flutterNapi: FlutterNapi;
+
+ /**
+ * Maps a channel name to an object that contains the task queue and the handler associated with
+ * the channel.
+ *
+ *
Reads and writes to this map must lock {@code handlersLock}.
+ */
+ messageHandlers: Map = new Map();
+
+ /**
+ * Maps a channel name to an object that holds information about the incoming Dart message.
+ *
+ * Reads and writes to this map must lock {@code handlersLock}.
+ */
+ bufferedMessages: Map = new Map();
+
+ handlersLock: Object = new Object();
+ enableBufferingIncomingMessagesFlag: boolean = false;
+
+ pendingReplies: Map = new Map();
+ nextReplyId: number = 1;
+ taskQueueFactory: TaskQueueFactory;
+ createdTaskQueues: Map = new Map();
+
+ constructor(flutterNapi: FlutterNapi) {
+ this.flutterNapi = flutterNapi;
+ this.taskQueueFactory = new DefaultTaskQueueFactory();
+ }
+ makeBackgroundTaskQueue(options: TaskQueueOptions): TaskQueue {
+ let taskQueue: DartMessengerTaskQueue = this.taskQueueFactory.makeBackgroundTaskQueue(options);
+ let token: TaskQueueToken = new TaskQueueToken();
+ this.createdTaskQueues.set(token, taskQueue);
+ return token;
+ }
+
+
+ setMessageHandler(channel: String, handler: BinaryMessageHandler, taskQueue?: TaskQueue): void {
+ if (handler == null) {
+ Log.d(TAG, "Removing handler for channel '" + channel + "'");
+ this.messageHandlers.delete(channel);
+ return;
+ }
+ let dartMessengerTaskQueue: DartMessengerTaskQueue | null = null;
+ if( taskQueue != null) {
+ dartMessengerTaskQueue = this.createdTaskQueues.get(taskQueue) ?? null;
+ if(dartMessengerTaskQueue == null) {
+ throw new Error(
+ "Unrecognized TaskQueue, use BinaryMessenger to create your TaskQueue (ex makeBackgroundTaskQueue)."
+ );
+ }
+ }
+ Log.d(TAG, "Setting handler for channel '" + channel + "'");
+
+ this.messageHandlers.set(channel, new HandlerInfo(handler, dartMessengerTaskQueue));
+ this.bufferedMessages.delete(channel);
+ }
+
+
+ enableBufferingIncomingMessages(): void {
+ this.enableBufferingIncomingMessagesFlag = true;
+ }
+
+ disableBufferingIncomingMessages(): void {
+ this.enableBufferingIncomingMessagesFlag = false;
+ this.bufferedMessages = new Map();
+ }
+
+ send(channel: String, message: ArrayBuffer, callback?: BinaryReply): void {
+ Log.d(TAG, "Sending message over channel '" + channel + "'");
+ TraceSection.begin("DartMessenger#send on " + channel);
+ try {
+ Log.d(TAG, "Sending message with callback over channel '" + channel + "'");
+ let replyId: number = this.nextReplyId++;
+ if (callback != null) {
+ this.pendingReplies.set(replyId, callback);
+ }
+ if (message == null) {
+ this.flutterNapi.dispatchEmptyPlatformMessage(channel, replyId);
+ } else {
+ this.flutterNapi.dispatchPlatformMessage(channel, message, message.byteLength, replyId);
+ }
+ } finally {
+ TraceSection.end("DartMessenger#send on " + channel);
+ }
+ }
+
+ async asyncInvokeHandler(handlerInfo: HandlerInfo | null, message: ArrayBuffer, replyId: number): Promise {
+ // Called from any thread.
+ if (handlerInfo != null) {
+ try {
+ Log.d(TAG, "Deferring to registered handler to process message.");
+ handlerInfo.handler.onMessage(message, new Reply(this.flutterNapi, replyId));
+ } catch (ex) {
+ Log.e(TAG, "Uncaught exception in binary message listener", ex);
+ this.flutterNapi.invokePlatformMessageEmptyResponseCallback(replyId);
+ }
+ } else {
+ Log.d(TAG, "No registered handler for message. Responding to Dart with empty reply message.");
+ this.flutterNapi.invokePlatformMessageEmptyResponseCallback(replyId);
+ }
+ }
+
+ invokeHandler(handlerInfo: HandlerInfo | null, message: ArrayBuffer, replyId: number): void {
+ // Called from any thread.
+ if (handlerInfo != null) {
+ try {
+ Log.d(TAG, "Deferring to registered handler to process message.");
+ handlerInfo.handler.onMessage(message, new Reply(this.flutterNapi, replyId));
+ } catch (ex) {
+ Log.e(TAG, "Uncaught exception in binary message listener", ex);
+ this.flutterNapi.invokePlatformMessageEmptyResponseCallback(replyId);
+ }
+ } else {
+ Log.d(TAG, "No registered handler for message. Responding to Dart with empty reply message.");
+ this.flutterNapi.invokePlatformMessageEmptyResponseCallback(replyId);
+ }
+ }
+
+ handleMessageFromDart(channel: String, message: ArrayBuffer, replyId: number, messageData: number): void {
+ // Called from any thread.
+ Log.d(TAG, "Received message from Dart over channel '" + channel + "'");
+
+ let handlerInfo: HandlerInfo | null = this.messageHandlers.get(channel) ?? null;
+ let messageDeferred: boolean;
+
+ messageDeferred = (this.enableBufferingIncomingMessagesFlag && handlerInfo == null);
+ if (messageDeferred) {
+ if (!this.bufferedMessages.has(channel)) {
+ this.bufferedMessages.set(channel, []);
+ }
+ let buffer: BufferedMessageInfo[] = this.bufferedMessages.get(channel) ?? [];
+ buffer.push(new BufferedMessageInfo(message, replyId, messageData));
+ }
+ if (!messageDeferred) {
+ //ArkTS 没有线程池,任务队列使用异步实现
+ if(handlerInfo?.taskQueue != null) {
+ this.asyncInvokeHandler(handlerInfo, message, replyId);
+ } else {
+ this.invokeHandler(handlerInfo, message, replyId);
+ }
+ }
+ }
+
+ handlePlatformMessageResponse(replyId: number, reply: ArrayBuffer): void {
+ Log.d(TAG, "Received message reply from Dart.");
+ let callback: BinaryReply | null = this.pendingReplies.get(replyId) ?? null;
+ this.pendingReplies.delete(replyId);
+ if (callback != null) {
+ try {
+ Log.d(TAG, "Invoking registered callback for reply from Dart.");
+ callback.reply(reply);
+ } catch (e) {
+ Log.e(TAG, "Uncaught exception in binary message reply handler", e);
+ }
+ }
+ }
+
+ /**
+ * Returns the number of pending channel callback replies.
+ *
+ * When sending messages to the Flutter application using {@link BinaryMessenger#send(String,
+ * ByteBuffer, io.flutter.plugin.common.BinaryMessenger.BinaryReply)}, developers can optionally
+ * specify a reply callback if they expect a reply from the Flutter application.
+ *
+ *
This method tracks all the pending callbacks that are waiting for response, and is supposed
+ * to be called from the main thread (as other methods). Calling from a different thread could
+ * possibly capture an indeterministic internal state, so don't do it.
+ */
+ getPendingChannelResponseCount(): number {
+ return this.pendingReplies.size;
+ }
+}
+
+
+
+
+
+
+/**
+ * Holds information about a platform handler, such as the task queue that processes messages from
+ * Dart.
+ */
+class HandlerInfo {
+ handler: BinaryMessageHandler;
+ taskQueue: DartMessengerTaskQueue | null;
+ constructor(handler: BinaryMessageHandler, taskQueue?:DartMessengerTaskQueue | null) {
+ this.handler = handler;
+ this.taskQueue = taskQueue ?? null;
+ }
+}
+
+/**
+ * Holds information that allows to dispatch a Dart message to a platform handler when it becomes
+ * available.
+ */
+class BufferedMessageInfo {
+ message: ArrayBuffer;
+ replyId: number;
+ messageData: number;
+
+ constructor(message: ArrayBuffer,
+ replyId: number,
+ messageData: number) {
+ this.message = message;
+ this.replyId = replyId;
+ this.messageData = messageData;
+ }
+}
+
+
+
+
+
+class Reply implements BinaryReply {
+ flutterNapi: FlutterNapi;
+ replyId: number;
+ done: boolean = false;
+
+ constructor(flutterNapi: FlutterNapi, replyId: number) {
+ this.flutterNapi = flutterNapi;
+ this.replyId = replyId;
+ }
+
+ reply(reply: ArrayBuffer) {
+ if (this.done) {
+ throw new Error("Reply already submitted");
+ }
+ if (reply == null) {
+ this.flutterNapi.invokePlatformMessageEmptyResponseCallback(this.replyId);
+ } else {
+ this.flutterNapi.invokePlatformMessageResponseCallback(this.replyId, reply, reply.byteLength);
+ }
+ }
+}
+
+interface DartMessengerTaskQueue {
+ dispatch(): void;
+}
+
+interface TaskQueueFactory {
+ makeBackgroundTaskQueue(options: TaskQueueOptions): DartMessengerTaskQueue;
+}
+
+class ConcurrentTaskQueue implements DartMessengerTaskQueue {
+ dispatch(): void {}
+}
+
+class DefaultTaskQueueFactory implements TaskQueueFactory {
+ makeBackgroundTaskQueue(options: TaskQueueOptions): DartMessengerTaskQueue {
+ return new ConcurrentTaskQueue();
+ }
+}
+
+class TaskQueueToken implements TaskQueue {}
\ No newline at end of file
diff --git a/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/dart/PlatformMessageHandler.ets b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/dart/PlatformMessageHandler.ets
new file mode 100644
index 0000000000000000000000000000000000000000..b6e3411862cb936f4e9af2c6e0ab6a49be3c9dce
--- /dev/null
+++ b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/dart/PlatformMessageHandler.ets
@@ -0,0 +1,22 @@
+/*
+* 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.
+*/
+
+export interface PlatformMessageHandler {
+
+ handleMessageFromDart(channel: String,message: ArrayBuffer,replyId: number, messageData: number): void;
+
+ handlePlatformMessageResponse(replyId: number, reply: ArrayBuffer): void;
+
+}
\ No newline at end of file
diff --git a/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/loader/ApplicationInfoLoader.ets b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/loader/ApplicationInfoLoader.ets
new file mode 100644
index 0000000000000000000000000000000000000000..3c5bca80d380c5387ac2c872b35f860e3e8eacad
--- /dev/null
+++ b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/loader/ApplicationInfoLoader.ets
@@ -0,0 +1,24 @@
+/*
+* 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 FlutterApplicationInfo from './FlutterApplicationInfo';
+import common from '@ohos.app.ability.common';
+
+export default class ApplicationInfoLoader {
+ static load(context: common.Context) {
+ let applicationInfo = new FlutterApplicationInfo(null, null, null, null, null, context.bundleCodeDir + '/libs/arm64', true);
+ return applicationInfo
+ }
+}
\ No newline at end of file
diff --git a/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/loader/FlutterApplicationInfo.ets b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/loader/FlutterApplicationInfo.ets
new file mode 100644
index 0000000000000000000000000000000000000000..bdb9509d4d89afbbefef1b651f8dab9dee43696a
--- /dev/null
+++ b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/loader/FlutterApplicationInfo.ets
@@ -0,0 +1,55 @@
+/*
+* 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.
+*/
+
+const DEFAULT_AOT_SHARED_LIBRARY_NAME = "libapp.so";
+const DEFAULT_VM_SNAPSHOT_DATA = "vm_snapshot_data";
+const DEFAULT_ISOLATE_SNAPSHOT_DATA = "isolate_snapshot_data";
+const DEFAULT_FLUTTER_ASSETS_DIR = "flutter_assets";
+
+
+/**
+ * application 信息,后期看如何设置
+ */
+export default class FlutterApplicationInfo {
+ aotSharedLibraryName: string;
+ vmSnapshotData: string;
+ isolateSnapshotData: string;
+ flutterAssetsDir: string;
+ domainNetworkPolicy: string;
+ nativeLibraryDir: string;
+ automaticallyRegisterPlugins: boolean;
+ //是否是开发模式,先放在这里,后续应该从context获取
+ isDebugMode: boolean;
+ //是否是profile模式
+ isProfile: boolean;
+
+ constructor(aotSharedLibraryName: string | null,
+ vmSnapshotData: string | null,
+ isolateSnapshotData: string | null,
+ flutterAssetsDir: string | null,
+ domainNetworkPolicy: string | null,
+ nativeLibraryDir: string,
+ automaticallyRegisterPlugins: boolean) {
+ this.aotSharedLibraryName = aotSharedLibraryName == null ? DEFAULT_AOT_SHARED_LIBRARY_NAME : aotSharedLibraryName;
+ this.vmSnapshotData = vmSnapshotData == null ? DEFAULT_VM_SNAPSHOT_DATA : vmSnapshotData;
+ this.isolateSnapshotData = isolateSnapshotData == null ? DEFAULT_ISOLATE_SNAPSHOT_DATA : isolateSnapshotData;
+ this.flutterAssetsDir = flutterAssetsDir == null ? DEFAULT_FLUTTER_ASSETS_DIR : flutterAssetsDir;
+ this.domainNetworkPolicy = domainNetworkPolicy == null ? "" : domainNetworkPolicy;
+ this.nativeLibraryDir = nativeLibraryDir;
+ this.automaticallyRegisterPlugins = automaticallyRegisterPlugins;
+ this.isDebugMode = true;
+ this.isProfile = false;
+ }
+}
\ No newline at end of file
diff --git a/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/loader/FlutterLoader.ets b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/loader/FlutterLoader.ets
new file mode 100644
index 0000000000000000000000000000000000000000..8917880d499cbbf798ef199e2eb0c621bc893516
--- /dev/null
+++ b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/loader/FlutterLoader.ets
@@ -0,0 +1,219 @@
+/*
+* 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.
+*/
+
+/**
+ * flutterLoader,负责dart虚拟机启动和dart代码加载
+ */
+import FlutterShellArgs from '../FlutterShellArgs';
+import FlutterNapi from '../FlutterNapi';
+import Log from '../../../util/Log';
+import FlutterApplicationInfo from './FlutterApplicationInfo';
+import common from '@ohos.app.ability.common';
+import StringUtils from '../../../util/StringUtils';
+import ApplicationInfoLoader from './ApplicationInfoLoader';
+import bundleManager from '@ohos.bundle.bundleManager';
+import fs from '@ohos.file.fs';
+
+const TAG = "FlutterLoader";
+
+//flutter引擎so
+const DEFAULT_LIBRARY = "libflutter.so";
+//jit产物默认kenel文件
+const DEFAULT_KERNEL_BLOB = "kernel_blob.bin";
+//jit产物,默认快照文件
+const VMSERVICE_SNAPSHOT_LIBRARY = "libvmservice_snapshot.so";
+//key值
+const SNAPSHOT_ASSET_PATH_KEY = "snapshot-asset-path";
+//key值
+const VM_SNAPSHOT_DATA_KEY = "vm-snapshot-data";
+//key值
+const ISOLATE_SNAPSHOT_DATA_KEY = "isolate-snapshot-data";
+
+
+const AOT_SHARED_LIBRARY_NAME = "aot-shared-library-name";
+
+const AOT_VMSERVICE_SHARED_LIBRARY_NAME = "aot-vmservice-shared-library-name";
+
+//文件路径分隔符
+const FILE_SEPARATOR = "/";
+
+/**
+ * 定位在hap包中的flutter资源,并且加载flutter native library.
+ */
+export default class FlutterLoader {
+ flutterNapi: FlutterNapi;
+ initResult: InitResult | null = null;
+ flutterApplicationInfo: FlutterApplicationInfo | null = null;
+ context: common.Context | null = null;
+ initialized: boolean = false;
+ //初始化开始时间戳
+ initStartTimestampMillis: number = 0;
+
+ constructor(flutterNapi: FlutterNapi) {
+ this.flutterNapi = flutterNapi;
+ }
+
+ /**
+ * Starts initialization of the native system.
+ *
+ *
This loads the Flutter engine's native library to enable subsequent JNI calls. This also
+ * starts locating and unpacking Dart resources packaged in the app's APK.
+ *
+ *
Calling this method multiple times has no effect.
+ *
+ * @param applicationContext The Android application context.
+ * @param settings Configuration settings.
+ */
+ async startInitialization(context: common.Context) {
+ Log.d(TAG, "flutterLoader start init")
+ this.initStartTimestampMillis = Date.now();
+ this.context = context;
+ this.flutterApplicationInfo = ApplicationInfoLoader.load(context);
+ Log.d(TAG, "context.filesDir=" + context.filesDir)
+ Log.d(TAG, "context.cacheDir=" + context.cacheDir)
+ Log.d(TAG, "context.bundleCodeDir=" + context.bundleCodeDir)
+ if (this.flutterApplicationInfo!.isDebugMode) {
+ await this.copyResource(context)
+ }
+ this.initResult = new InitResult(
+ `${context.filesDir}/`,
+ `${context.cacheDir}/`,
+ `${context.filesDir}`
+ )
+ Log.d(TAG, "flutterLoader end init")
+ }
+
+ private async copyResource(context: common.Context) {
+ let filePath = context.filesDir + FILE_SEPARATOR + this.flutterApplicationInfo!.flutterAssetsDir
+ if (!fs.accessSync(filePath + FILE_SEPARATOR + DEFAULT_KERNEL_BLOB) && this.context != null) {
+ Log.d(TAG, "start copyResource")
+ fs.mkdirSync(filePath)
+
+ let icudtlBuffer = await this.context.resourceManager.getRawFileContent(this.flutterApplicationInfo!.flutterAssetsDir + "/icudtl.dat")
+ let icudtlFile = fs.openSync(filePath + FILE_SEPARATOR + "/icudtl.dat", fs.OpenMode.READ_WRITE | fs.OpenMode.CREATE)
+ fs.writeSync(icudtlFile.fd, icudtlBuffer.buffer)
+
+ let kernelBuffer = await this.context.resourceManager.getRawFileContent(this.flutterApplicationInfo!.flutterAssetsDir + FILE_SEPARATOR + DEFAULT_KERNEL_BLOB)
+ let kernelFile = fs.openSync(filePath + FILE_SEPARATOR + DEFAULT_KERNEL_BLOB, fs.OpenMode.READ_WRITE | fs.OpenMode.CREATE)
+ fs.writeSync(kernelFile.fd, kernelBuffer.buffer)
+
+ let vmBuffer = await this.context.resourceManager.getRawFileContent(this.flutterApplicationInfo!.flutterAssetsDir + FILE_SEPARATOR + this.flutterApplicationInfo!.vmSnapshotData)
+ let vmFile = fs.openSync(filePath + FILE_SEPARATOR + this.flutterApplicationInfo!.vmSnapshotData, fs.OpenMode.READ_WRITE | fs.OpenMode.CREATE)
+ fs.writeSync(vmFile.fd, vmBuffer.buffer)
+
+ let isolateBuffer = await this.context.resourceManager.getRawFileContent(this.flutterApplicationInfo!.flutterAssetsDir + FILE_SEPARATOR + this.flutterApplicationInfo!.isolateSnapshotData)
+ let isolateFile = fs.openSync(filePath + FILE_SEPARATOR + this.flutterApplicationInfo!.isolateSnapshotData, fs.OpenMode.READ_WRITE | fs.OpenMode.CREATE)
+ fs.writeSync(isolateFile.fd, isolateBuffer.buffer)
+ Log.d(TAG, "copyResource end")
+ } else {
+ Log.d(TAG, "no copyResource")
+ }
+ }
+
+ /**
+ * 初始化dart虚拟机方法
+ * @param flutterShellArgs
+ */
+ ensureInitializationComplete(shellArgs: Array | null) {
+ if (this.initialized) {
+ return;
+ }
+ Log.d(TAG, "ensureInitializationComplete")
+ if (shellArgs == null) {
+ shellArgs = new Array();
+ }
+ shellArgs.push(
+ "--icu-native-lib-path="
+ + this.flutterApplicationInfo!.nativeLibraryDir
+ + FILE_SEPARATOR + DEFAULT_LIBRARY
+ );
+
+ let kernelPath: string = "";
+ if (this.flutterApplicationInfo!.isDebugMode) {
+ Log.d(TAG, "this.initResult!.dataDirPath=" + this.initResult!.dataDirPath)
+ const snapshotAssetPath = this.initResult!.dataDirPath + FILE_SEPARATOR + this.flutterApplicationInfo!.flutterAssetsDir;
+ kernelPath = snapshotAssetPath + FILE_SEPARATOR + DEFAULT_KERNEL_BLOB;
+ shellArgs.push("--icu-data-file-path=" + snapshotAssetPath + "/icudtl.dat")
+ shellArgs.push("--" + SNAPSHOT_ASSET_PATH_KEY + "=" + snapshotAssetPath);
+ shellArgs.push("--" + VM_SNAPSHOT_DATA_KEY + "=" + this.flutterApplicationInfo!.vmSnapshotData);
+ shellArgs.push(
+ "--" + ISOLATE_SNAPSHOT_DATA_KEY + "=" + this.flutterApplicationInfo!.isolateSnapshotData);
+ } else {
+ shellArgs.push(
+ "--" + AOT_SHARED_LIBRARY_NAME + "=" + this.flutterApplicationInfo!.aotSharedLibraryName);
+ shellArgs.push(
+ "--"
+ + AOT_SHARED_LIBRARY_NAME
+ + "="
+ + this.flutterApplicationInfo!.nativeLibraryDir
+ + FILE_SEPARATOR
+ + this.flutterApplicationInfo!.aotSharedLibraryName);
+ if (this.flutterApplicationInfo!.isProfile) {
+ shellArgs.push("--" + AOT_VMSERVICE_SHARED_LIBRARY_NAME + "=" + VMSERVICE_SNAPSHOT_LIBRARY);
+ }
+ }
+ shellArgs.push("--cache-dir-path=" + this.initResult!.engineCachesPath);
+ if (StringUtils.isNotEmpty(this.flutterApplicationInfo!.domainNetworkPolicy)) {
+ shellArgs.push("--domain-network-policy=" + this.flutterApplicationInfo!.domainNetworkPolicy);
+ }
+
+ const resourceCacheMaxBytesThreshold = 1080 * 1920 * 12 * 4;
+ shellArgs.push("--resource-cache-max-bytes-threshold=" + resourceCacheMaxBytesThreshold);
+
+ shellArgs.push("--prefetched-default-font-manager");
+
+ shellArgs.push("--leak-vm=" + true);
+
+ //shellArgs.push("--enable-impeller");
+
+ // //最终初始化操作
+ const costTime = Date.now() - this.initStartTimestampMillis;
+ this.flutterNapi!.init(
+ this.context!,
+ shellArgs,
+ kernelPath,
+ this.initResult!.appStoragePath,
+ this.initResult!.engineCachesPath!,
+ costTime
+ );
+ this.initialized = true;
+ }
+
+ findAppBundlePath(): string {
+ return this.flutterApplicationInfo == null ? "" : this.flutterApplicationInfo!.flutterAssetsDir;
+ }
+
+ getLookupKeyForAsset(asset: string, packageName?: string): string {
+ return this.fullAssetPathFrom(asset);
+ }
+
+ fullAssetPathFrom(filePath: string): string {
+ return this.flutterApplicationInfo == null ? "" : this.flutterApplicationInfo!.flutterAssetsDir + "/" + filePath;
+ }
+}
+
+class InitResult {
+ appStoragePath: string;
+ engineCachesPath: string;
+ dataDirPath: string;
+
+ constructor(appStoragePath: string,
+ engineCachesPath: string,
+ dataDirPath: string) {
+ this.appStoragePath = appStoragePath;
+ this.engineCachesPath = engineCachesPath;
+ this.dataDirPath = dataDirPath;
+ }
+}
diff --git a/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/mutatorsstack/FlutterMutatorView.ets b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/mutatorsstack/FlutterMutatorView.ets
new file mode 100644
index 0000000000000000000000000000000000000000..f2544f8e20b9041a7db93d99ba3e1a2db3da67a5
--- /dev/null
+++ b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/mutatorsstack/FlutterMutatorView.ets
@@ -0,0 +1,135 @@
+/*
+* 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 ArrayList from '@ohos.util.ArrayList';
+import matrix4 from '@ohos.matrix4';
+import { DVModel, DVModelEvents, DVModelParameters } from '../../../view/DynamicView/dynamicView';
+import { createDVModelFromJson } from '../../../view/DynamicView/dynamicViewJson';
+import OhosTouchProcessor from '../../ohos/OhosTouchProcessor';
+import { FlutterMutator, FlutterMutatorsStack } from './FlutterMutatorsStack'
+
+export class FlutterMutatorView {
+ private mutatorsStack: FlutterMutatorsStack | null = null;
+ private screenDensity: number = 0;
+ private left: number = 0;
+ private top: number = 0;
+ private prevLeft: number = 0;
+ private prevTop: number = 0;
+
+ private onTouch = (touchEvent: ESObject) => {
+ let params = this.model.params as Record;
+ switch (touchEvent.type) {
+ case TouchType.Down:
+ this.prevLeft = this.left;
+ this.prevTop = this.top;
+ params.translateX = this.left;
+ params.translateY = this.top;
+ break;
+ case TouchType.Move:
+ params.translateX = this.prevLeft;
+ params.translateY = this.prevTop;
+ this.prevLeft = this.left;
+ this.prevTop = this.top;
+ break;
+ case TouchType.Up:
+ case TouchType.Cancel:
+ default:
+ break;
+ }
+ }
+
+ private model: DVModel = createDVModelFromJson(
+ new DVModelParam("Column", [], { backgroundColor: Color.Red }, { onTouch: this.onTouch })
+ );
+
+ setOnDescendantFocusChangeListener(onFocus: () => void, onBlur: () => void) {
+ // this.model.events["onFocus"] = onFocus;
+ // this.model.events["onBlur"] = onBlur;
+ let events2 = this.model.events as Record;
+ events2.onFocus = onFocus;
+ events2.onBlur = onBlur;
+ }
+
+ public setLayoutParams(parameters: DVModelParameters): void {
+ if (this.model.params == null) {
+ this.model.params = new DVModelParameters();
+ }
+ let params = this.model.params as Record | matrix4.Matrix4Transit>;
+ let parametersRecord = parameters as Record | matrix4.Matrix4Transit>;
+ params.marginLeft = parametersRecord['marginLeft'];
+ params.marginTop = parametersRecord['marginTop'];
+ params.width = parametersRecord['width'];
+ params.height = parametersRecord['height'];
+ this.left = parametersRecord.marginLeft as number;
+ this.top = parametersRecord.marginTop as number ;
+ }
+
+ public addDvModel(model: DVModel): void {
+ this.model?.children.push(model);
+ }
+
+ public readyToDisplay(mutatorsStack: FlutterMutatorsStack, left: number, top: number, width: number, height: number) {
+ this.mutatorsStack = mutatorsStack;
+ this.left = left;
+ this.top = top;
+ let parameters = new DVModelParameters() as Record | matrix4.Matrix4Transit>;
+ parameters['marginLeft'] = left;
+ parameters['marginTop'] = top;
+ parameters['width'] = width;
+ parameters['height'] = height;
+ this.setLayoutParams(parameters);
+ this.dealMutators();
+ }
+
+ private dealMutators() {
+ if (this.mutatorsStack == null) {
+ return;
+ }
+ let paths = this.mutatorsStack.getFinalClippingPaths();
+ let rects = this.mutatorsStack.getFinalClippingRects();
+ let matrix = this.mutatorsStack.getFinalMatrix();
+ let params = this.model.params as Record | matrix4.Matrix4Transit>;
+ if (!paths.isEmpty()) {
+ let path = paths.getLast();
+ params.pathWidth = path.width;
+ params.pathHeight = path.height;
+ params.pathCommands = path.commands;
+ }
+ if (!rects.isEmpty()) {
+ let rect = rects.getLast();
+ params.rectWidth = rect.width;
+ params.rectHeight = rect.height;
+ params.rectRadius = rect.radius;
+ }
+ params.matrix = matrix;
+ }
+
+ public getDvModel(): DVModel | undefined {
+ return this.model;
+ }
+}
+
+class DVModelParam {
+ compType: string
+ children: []
+ attributes: ESObject
+ events: ESObject
+
+ constructor(compType: string, children: [], attributes: ESObject, events: ESObject) {
+ this.compType = compType;
+ this.children = children;
+ this.attributes = attributes;
+ this.events = events;
+ }
+};
\ No newline at end of file
diff --git a/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/mutatorsstack/FlutterMutatorsStack.ets b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/mutatorsstack/FlutterMutatorsStack.ets
new file mode 100644
index 0000000000000000000000000000000000000000..2f53c6c041bfd92ea74c3896d00a04f6b5590e2e
--- /dev/null
+++ b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/mutatorsstack/FlutterMutatorsStack.ets
@@ -0,0 +1,136 @@
+/*
+* 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 matrix4 from '@ohos.matrix4'
+import List from '@ohos.util.List';
+
+export enum FlutterMutatorType {
+ CLIP_RECT,
+ CLIP_PATH,
+ TRANSFORM,
+ OPACITY
+}
+
+class Rect {
+ width: number;
+ height: number;
+ radius: string | number | Array;
+
+ constructor(width:number, height:number, radius?:string | number | Array) {
+ this.width = width;
+ this.height = height;
+ this.radius = radius ?? 0;
+ }
+}
+
+class Path {
+ width: number | string;
+ height: number | string;
+ commands: string;
+
+ constructor(width:number | string, height:number | string, commands?:string) {
+ this.width = width;
+ this.height = height;
+ this.commands = commands ?? '';
+ }
+}
+
+export class FlutterMutator {
+ private matrix: matrix4.Matrix4Transit | null = null;
+ private rect: Rect = new Rect(0, 0);
+ private path: Path = new Path(0, 0);
+
+ constructor(args: matrix4.Matrix4Transit | Rect | Path) {
+ if (args instanceof Rect) {
+ this.rect = args;
+ } else if (args instanceof Path) {
+ this.path = args;
+ } else {
+ this.matrix = args;
+ }
+ }
+
+ public getMatrix() : matrix4.Matrix4Transit | null {
+ return this.matrix;
+ }
+
+ public getRect() {
+ return this.rect;
+ }
+
+ public getPath() {
+ return this.path;
+ }
+}
+
+export class FlutterMutatorsStack {
+ private mutators: List;
+ private finalClippingPaths: List;
+ private finalClippingRects: List;
+
+ private finalMatrix: matrix4.Matrix4Transit;
+
+ constructor() {
+ this.mutators = new List();
+ this.finalClippingPaths = new List();
+ this.finalClippingRects = new List();
+ this.finalMatrix = matrix4.identity();
+ }
+
+ public pushTransform(values: Array): void {
+ if (values.length != 16) {
+ return;
+ }
+ let index = 0;
+ let matrix = matrix4.init(
+ [values[index++], values[index++], values[index++], values[index++],
+ values[index++], values[index++], values[index++], values[index++],
+ values[index++], values[index++], values[index++], values[index++],
+ values[index++], values[index++], values[index++], values[index++]]);
+ let mutator = new FlutterMutator(matrix);
+ this.mutators.add(mutator);
+ this.finalMatrix.combine(matrix);
+ }
+
+ public pushClipRect(width:number, height:number, radius?:number) {
+ let rect = new Rect(width, height, radius);
+ let mutator = new FlutterMutator(rect);
+ this.mutators.add(mutator);
+ this.finalClippingRects.add(rect);
+ }
+
+ public pushClipPath(width:number, height:number, command?:string) {
+ let path = new Path(width, height, command);
+ let mutator = new FlutterMutator(path);
+ this.mutators.add(mutator);
+ this.finalClippingPaths.add(path);
+ }
+
+ public getMutators() {
+ return this.mutators;
+ }
+
+ public getFinalClippingPaths() {
+ return this.finalClippingPaths;
+ }
+
+ public getFinalClippingRects() {
+ return this.finalClippingRects;
+ }
+
+ public getFinalMatrix() {
+ return this.finalMatrix;
+ }
+}
\ No newline at end of file
diff --git a/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/FlutterPlugin.ets b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/FlutterPlugin.ets
new file mode 100644
index 0000000000000000000000000000000000000000..6b0987a80677a337a548f4c876941dd13cfda266
--- /dev/null
+++ b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/FlutterPlugin.ets
@@ -0,0 +1,125 @@
+/*
+* 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 { BinaryMessenger } from '../../../plugin/common/BinaryMessenger';
+import PlatformViewFactory from '../../../plugin/platform/PlatformViewFactory';
+import PlatformViewRegistry from '../../../plugin/platform/PlatformViewRegistry';
+import FlutterEngineGroup from '../FlutterEngineGroup';
+
+export interface FlutterPlugin {
+ //获取唯一的类名 类似安卓的Class extends FlutterPlugin ts无法实现只能用户自定义
+ getUniqueClassName(): string
+
+ /**
+ * This {@code FlutterPlugin} has been associated with a {@link
+ * io.flutter.embedding.engine.FlutterEngine} instance.
+ *
+ * Relevant resources that this {@code FlutterPlugin} may need are provided via the {@code
+ * binding}. The {@code binding} may be cached and referenced until {@link
+ * #onDetachedFromEngine(FlutterPluginBinding)} is invoked and returns.
+ */
+ onAttachedToEngine(binding: FlutterPluginBinding): void;
+
+ /**
+ * This {@code FlutterPlugin} has been removed from a {@link
+ * io.flutter.embedding.engine.FlutterEngine} instance.
+ *
+ *
The {@code binding} passed to this method is the same instance that was passed in {@link
+ * #onAttachedToEngine(FlutterPluginBinding)}. It is provided again in this method as a
+ * convenience. The {@code binding} may be referenced during the execution of this method, but it
+ * must not be cached or referenced after this method returns.
+ *
+ *
{@code FlutterPlugin}s should release all resources in this method.
+ */
+ onDetachedFromEngine(binding: FlutterPluginBinding): void;
+}
+
+export class FlutterPluginBinding {
+ private applicationContext: common.Context;
+ private binaryMessenger: BinaryMessenger;
+ private flutterAssets: FlutterAssets;
+ private group: FlutterEngineGroup;
+ private platformViewRegistry: PlatformViewRegistry;
+
+ constructor(applicationContext: common.Context, binaryMessenger: BinaryMessenger, flutterAssets: FlutterAssets, group: FlutterEngineGroup, platformViewRegistry?: PlatformViewRegistry) {
+ this.applicationContext = applicationContext;
+ this.binaryMessenger = binaryMessenger;
+ this.flutterAssets = flutterAssets;
+ this.group = group;
+ this.platformViewRegistry = platformViewRegistry ?? new EmptyPlatformViewRegistry();
+ }
+
+ getApplicationContext(): common.Context {
+ return this.applicationContext;
+ }
+
+ getBinaryMessenger(): BinaryMessenger {
+ return this.binaryMessenger;
+ }
+
+ getFlutterAssets(): FlutterAssets {
+ return this.flutterAssets;
+ }
+
+ getEngineGroup(): FlutterEngineGroup {
+ return this.group;
+ }
+
+ public getPlatformViewRegistry(): PlatformViewRegistry {
+ return this.platformViewRegistry;
+ }
+}
+
+/** Provides Flutter plugins with access to Flutter asset information. */
+export interface FlutterAssets {
+ /**
+ * Returns the relative file path to the Flutter asset with the given name, including the file's
+ * extension, e.g., {@code "myImage.jpg"}.
+ *
+ *
The returned file path is relative to the Ohos app's standard assets directory.
+ * Therefore, the returned path is appropriate to pass to Ohos's {@code ResourceManage}, but
+ * the path is not appropriate to load as an absolute path.
+ */
+ getAssetFilePathByName(assetFileName: string): string;
+
+ /**
+ * Same as {@link #getAssetFilePathByName(String)} but with added support for an explicit
+ * Ohos {@code bundleName}.
+ */
+ getAssetFilePathByName(assetFileName: string, bundleName: string): string;
+
+ /**
+ * Returns the relative file path to the Flutter asset with the given subpath, including the
+ * file's extension, e.g., {@code "/dir1/dir2/myImage.jpg"}.
+ *
+ *
The returned file path is relative to the Ohos app's standard assets directory.
+ * Therefore, the returned path is appropriate to pass to Ohos's {@code ResourceManage}, but
+ * the path is not appropriate to load as an absolute path.
+ */
+ getAssetFilePathBySubpath(assetSubpath: string): string;
+
+ /**
+ * Same as {@link #getAssetFilePathBySubpath(String)} but with added support for an explicit
+ * Ohos {@code bundleName}.
+ */
+ getAssetFilePathBySubpath(assetSubpath: string, bundleName: string): string;
+}
+
+class EmptyPlatformViewRegistry implements PlatformViewRegistry {
+ registerViewFactory(viewTypeId: string, factory: PlatformViewFactory): boolean {
+ return false;
+ }
+}
\ No newline at end of file
diff --git a/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/PluginRegistry.ets b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/PluginRegistry.ets
new file mode 100644
index 0000000000000000000000000000000000000000..1a322ec2ba1bbcfcbce180b00ec4df6356733180
--- /dev/null
+++ b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/PluginRegistry.ets
@@ -0,0 +1,73 @@
+/*
+* 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 { FlutterPlugin } from './FlutterPlugin';
+
+export default interface PluginRegistry {
+ /**
+ * Attaches the given {@code plugin} to the {@link io.flutter.embedding.engine.FlutterEngine}
+ * associated with this {@code PluginRegistry}.
+ */
+ add(plugin: FlutterPlugin): void;
+
+ /**
+ * Attaches the given {@code plugins} to the {@link io.flutter.embedding.engine.FlutterEngine}
+ * associated with this {@code PluginRegistry}.
+ */
+ addList(plugins: Set): void;
+
+ /**
+ * Returns true if a plugin of the given type is currently attached to the {@link
+ * io.flutter.embedding.engine.FlutterEngine} associated with this {@code PluginRegistry}.
+ */
+ //Class extends FlutterPlugin>
+ has(pluginClassName: string): boolean;
+
+ /**
+ * Returns the instance of a plugin that is currently attached to the {@link
+ * io.flutter.embedding.engine.FlutterEngine} associated with this {@code PluginRegistry}, which
+ * matches the given {@code pluginClass}.
+ *
+ * If no matching plugin is found, {@code null} is returned.
+ */
+ //Class extends FlutterPlugin>
+ get(pluginClassName: string): FlutterPlugin;
+
+ /**
+ * Detaches the plugin of the given type from the {@link
+ * io.flutter.embedding.engine.FlutterEngine} associated with this {@code PluginRegistry}.
+ *
+ *
If no such plugin exists, this method does nothing.
+ */
+ //Class extends FlutterPlugin>
+ remove(pluginClassName: string): void;
+
+ /**
+ * Detaches the plugins of the given types from the {@link
+ * io.flutter.embedding.engine.FlutterEngine} associated with this {@code PluginRegistry}.
+ *
+ *
If no such plugins exist, this method does nothing.
+ */
+ //Class extends FlutterPlugin>
+ removeList(pluginClassNames: Set): void;
+
+ /**
+ * Detaches all plugins that are currently attached to the {@link
+ * io.flutter.embedding.engine.FlutterEngine} associated with this {@code PluginRegistry}.
+ *
+ * If no plugins are currently attached, this method does nothing.
+ */
+ removeAll(): void;
+}
\ No newline at end of file
diff --git a/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/ability/AbilityAware.ets b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/ability/AbilityAware.ets
new file mode 100644
index 0000000000000000000000000000000000000000..bd68f68aee68859e0c13b696743c8d9d280b7500
--- /dev/null
+++ b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/ability/AbilityAware.ets
@@ -0,0 +1,75 @@
+/*
+* 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.
+*/
+
+/**
+ * {@link io.flutter.embedding.engine.plugins.FlutterPlugin} that is interested in {@link
+ * ohos.app.ability.UIAbility} lifecycle events related to a {@link
+ * io.flutter.embedding.engine.FlutterEngine} running within the given {@link ohos.app.ability.UIAbility}.
+ */
+import { AbilityPluginBinding } from './AbilityPluginBinding';
+
+export default interface AbilityAware {
+ /**
+ * This {@code AbilityAware} {@link io.flutter.embedding.engine.plugins.FlutterPlugin} is now
+ * associated with an {@link ohos.app.ability.UIAbility}.
+ *
+ *
This method can be invoked in 1 of 2 situations:
+ *
+ *
+ * - This {@code AbilityAware} {@link io.flutter.embedding.engine.plugins.FlutterPlugin} was
+ * just added to a {@link io.flutter.embedding.engine.FlutterEngine} that was already
+ * connected to a running {@link ohos.app.ability.UIAbility}.
+ *
- This {@code AbilityAware} {@link io.flutter.embedding.engine.plugins.FlutterPlugin} was
+ * already added to a {@link io.flutter.embedding.engine.FlutterEngine} and that {@link
+ * io.flutter.embedding.engine.FlutterEngine} was just connected to an {@link
+ * ohos.app.ability.UIAbility}.
+ *
+ *
+ * The given {@link AbilityPluginBinding} contains {@link ohos.app.ability.UIAbility}-related
+ * references that an {@code AbilityAware} {@link
+ * io.flutter.embedding.engine.plugins.FlutterPlugin} may require, such as a reference to the
+ * actual {@link ohos.app.ability.UIAbility} in question. The {@link AbilityPluginBinding} may be
+ * referenced until either {@link #onDetachedFromAbilityForConfigChanges()} or {@link
+ * #onDetachedFromAbility()} is invoked. At the conclusion of either of those methods, the
+ * binding is no longer valid. Clear any references to the binding or its resources, and do not
+ * invoke any further methods on the binding or its resources.
+ */
+ onAttachedToAbility(binding: AbilityPluginBinding): void ;
+
+ /**
+ * This plugin has been detached from an {@link ohos.app.ability.UIAbility}.
+ *
+ * Detachment can occur for a number of reasons.
+ *
+ *
+ * - The app is no longer visible and the {@link ohos.app.ability.UIAbility} instance has been
+ * destroyed.
+ *
- The {@link io.flutter.embedding.engine.FlutterEngine} that this plugin is connected to
+ * has been detached from its {@link io.flutter.embedding.android.FlutterView}.
+ *
- This {@code AbilityAware} plugin has been removed from its {@link
+ * io.flutter.embedding.engine.FlutterEngine}.
+ *
+ *
+ * By the end of this method, the {@link ohos.app.ability.UIAbility} that was made available in {@link
+ * #onAttachedToAbility(AbilityPluginBinding)} is no longer valid. Any references to the
+ * associated {@link ohos.app.ability.UIAbility} or {@link AbilityPluginBinding} should be cleared.
+ *
+ * Any {@code Lifecycle} listeners that were registered in {@link
+ * #onAttachedToAbility(AbilityPluginBinding)} or {@link
+ * #onReattachedToAbilityForConfigChanges(AbilityPluginBinding)} should be deregistered here to
+ * avoid a possible memory leak and other side effects.
+ */
+ onDetachedFromAbility(): void;
+}
diff --git a/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/ability/AbilityControlSurface.ets b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/ability/AbilityControlSurface.ets
new file mode 100644
index 0000000000000000000000000000000000000000..947ccef4ba35c189f2c74f81c0f53eaf025cba36
--- /dev/null
+++ b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/ability/AbilityControlSurface.ets
@@ -0,0 +1,27 @@
+/*
+* 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 AbilityConstant from '@ohos.app.ability.AbilityConstant';
+import Want from '@ohos.app.ability.Want';
+import UIAbility from '@ohos.app.ability.UIAbility';
+import ExclusiveAppComponent from '../../../ohos/ExclusiveAppComponent';
+
+export default interface ActivityControlSurface {
+ attachToAbility(exclusiveActivity: ExclusiveAppComponent): void;
+ detachFromAbility(): void;
+ onNewWant(want: Want, launchParams: AbilityConstant.LaunchParam): void;
+ onWindowFocusChanged(hasFocus: boolean): void;
+ onSaveState(reason: AbilityConstant.StateType, wantParam: Record): AbilityConstant.OnSaveResult;
+}
\ No newline at end of file
diff --git a/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/ability/AbilityPluginBinding.ets b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/ability/AbilityPluginBinding.ets
new file mode 100644
index 0000000000000000000000000000000000000000..349010b14ee70aff187ff938c146f14d6c7a080e
--- /dev/null
+++ b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/ability/AbilityPluginBinding.ets
@@ -0,0 +1,84 @@
+/*
+* 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 UIAbility from '@ohos.app.ability.UIAbility'
+import Want from '@ohos.app.ability.Want';
+import AbilityConstant from '@ohos.app.ability.AbilityConstant';
+
+export interface AbilityPluginBinding {
+ getAbility(): UIAbility;
+ /**
+ * Adds a listener that is invoked whenever the associated {@link ohos.app.ability.UIAbility}'s {@code
+ * onNewWant(...)} method is invoked.
+ */
+ addOnNewWantListener(listener: NewWantListener): void;
+
+ /**
+ * Removes a listener that was added in {@link
+ * #addOnNewWantListener(NewWantListener)}.
+ */
+ removeOnNewWantListener(listener: NewWantListener): void;
+
+ /**
+ * Adds a listener that is invoked whenever the associated {@link ohos.app.ability.UIAbility}'s {@code
+ * windowStageEvent} method is invoked.
+ */
+ addOnWindowFocusChangedListener(listener: WindowFocusChangedListener): void;
+
+ /**
+ * Removes a listener that was added in {@link
+ * #addOnWindowFocusChangedListener(WindowFocusChangedListener)}.
+ */
+ removeOnWindowFocusChangedListener(listener: WindowFocusChangedListener): void;
+
+ /**
+ * Adds a listener that is invoked when the associated {@code UIAbility} saves
+ * and restores instance state.
+ */
+ addOnSaveStateListener(listener: OnSaveStateListener): void;
+
+ /**
+ * Removes a listener that was added in {@link
+ * #addOnSaveStateListener(OnSaveStateListener)}.
+ */
+ removeOnSaveStateListener(listener: OnSaveStateListener): void;
+}
+
+/**
+ * Delegate interface for handling new wants on behalf of the main {@link ohos.app.ability.UIAbility}.
+ */
+export interface NewWantListener {
+ /**
+ * @param intent The new want that was started for the UIAbility.
+ * @return true if the new want has been handled.
+ */
+ onNewWant(want: Want, launchParams: AbilityConstant.LaunchParam): void;
+}
+
+/**
+ * Delegate interface for handling window focus changes on behalf of the main {@link
+ * ohos.app.ability.UIAbility}.
+ */
+export interface WindowFocusChangedListener {
+ onWindowFocusChanged(hasFocus: boolean): void;
+}
+
+export interface OnSaveStateListener {
+ /**
+ * Invoked when the associated {@code UIAbility} or {@code Fragment} executes {@link
+ * Activity#onSaveState(Bundle)}.
+ */
+ onSaveState(reason: AbilityConstant.StateType, wantParam: Record): AbilityConstant.OnSaveResult;
+}
\ No newline at end of file
diff --git a/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/renderer/FlutterUiDisplayListener.ets b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/renderer/FlutterUiDisplayListener.ets
new file mode 100644
index 0000000000000000000000000000000000000000..2a0af4009cafd2cf5229f082a41ed2d445c69caa
--- /dev/null
+++ b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/renderer/FlutterUiDisplayListener.ets
@@ -0,0 +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.
+*/
+
+export interface FlutterUiDisplayListener {
+ onFlutterUiDisplayed(): void;
+
+ onFlutterUiNoLongerDisplayed(): void;
+}
\ No newline at end of file
diff --git a/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/systemchannels/AccessibilityChannel.ets b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/systemchannels/AccessibilityChannel.ets
new file mode 100644
index 0000000000000000000000000000000000000000..804994eda64980ff6d23470994cf32cebfed977b
--- /dev/null
+++ b/sqflite/ohos/sqflite/oh_modules/.ohpm/@ohos+flutter_ohos@9dd5beymeoxhsmtiwsbnrq8f9h8=/oh_modules/@ohos/flutter_ohos/src/main/ets/embedding/engine/systemchannels/AccessibilityChannel.ets
@@ -0,0 +1,119 @@
+/*
+* 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 Log from '../../../util/Log';
+import DartExecutor from '../dart/DartExecutor';
+import BasicMessageChannel, { MessageHandler, Reply} from '../../../plugin/common/BasicMessageChannel';
+import HashMap from '@ohos.util.HashMap';
+import FlutterNapi, {AccessibilityDelegate} from '../FlutterNapi';
+import { Action } from '../../../view/AccessibilityBridge'
+import StandardMessageCodec from '../../../plugin/common/StandardMessageCodec';
+import StringUtils from '../../../util/StringUtils';
+
+/**
+* 辅助功能channel
+*/
+export default class AccessibilityChannel implements MessageHandler