From bfbbdd4701dad6a230e559abb2d10be11bc257f5 Mon Sep 17 00:00:00 2001 From: liuyuehu <3455278857@qq.com> Date: Mon, 8 Apr 2024 20:45:13 +0800 Subject: [PATCH 1/2] =?UTF-8?q?camera:=E4=BF=AE=E6=94=B9example,=E8=A1=A5?= =?UTF-8?q?=E5=85=85=E6=9D=83=E9=99=90=EF=BC=8C=E6=94=AF=E6=8C=81=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E6=92=AD=E6=94=BE=EF=BC=8C=E5=B1=8F=E5=B9=95=E6=97=8B?= =?UTF-8?q?=E8=BD=AC=E5=8A=9F=E8=83=BD=20Signed-off-by:=20liuyuehu=20<3455?= =?UTF-8?q?278857@qq.com>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/fileselector/file_selector.dart | 33 +++ .../lib/fileselector/file_selector_api.dart | 142 +++++++++++++ .../camera/camera_ohos/example/lib/main.dart | 15 +- .../main/ets/entryability/EntryAbility.ets | 2 + .../main/ets/fileselector/FileSelector.ets | 82 ++++++++ .../fileselector/FileSelectorOhosPlugin.ets | 56 +++++ .../fileselector/GeneratedFileSelectorApi.ets | 194 ++++++++++++++++++ .../example/ohos/entry/src/main/module.json5 | 60 +++++- .../main/resources/base/element/string.json | 4 + .../main/resources/en_US/element/string.json | 4 + 10 files changed, 586 insertions(+), 6 deletions(-) create mode 100644 packages/camera/camera_ohos/example/lib/fileselector/file_selector.dart create mode 100644 packages/camera/camera_ohos/example/lib/fileselector/file_selector_api.dart create mode 100644 packages/camera/camera_ohos/example/ohos/entry/src/main/ets/fileselector/FileSelector.ets create mode 100644 packages/camera/camera_ohos/example/ohos/entry/src/main/ets/fileselector/FileSelectorOhosPlugin.ets create mode 100644 packages/camera/camera_ohos/example/ohos/entry/src/main/ets/fileselector/GeneratedFileSelectorApi.ets diff --git a/packages/camera/camera_ohos/example/lib/fileselector/file_selector.dart b/packages/camera/camera_ohos/example/lib/fileselector/file_selector.dart new file mode 100644 index 000000000..693746d50 --- /dev/null +++ b/packages/camera/camera_ohos/example/lib/fileselector/file_selector.dart @@ -0,0 +1,33 @@ +/* +* Copyright (c) 2024 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 'file_selector_api.dart'; + +class FileSelector { + FileSelector({ FileSelectorApi? api}) + : _api = api ?? FileSelectorApi(); + + final FileSelectorApi _api; + + /// Registers this class as the implementation of the file_selector platform interface. + /// + @override + Future openFileByPath(String path) async { + final int? fd = await _api.openFileByPath(path); + print("openfile#"); + print(fd); + return fd; + } +} \ No newline at end of file diff --git a/packages/camera/camera_ohos/example/lib/fileselector/file_selector_api.dart b/packages/camera/camera_ohos/example/lib/fileselector/file_selector_api.dart new file mode 100644 index 000000000..8ff6df7c6 --- /dev/null +++ b/packages/camera/camera_ohos/example/lib/fileselector/file_selector_api.dart @@ -0,0 +1,142 @@ +/* +* Copyright (c) 2024 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 'dart:async'; +import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; +import 'package:flutter/services.dart'; + +class FileResponse { + FileResponse({ + required this.path, + this.name, + required this.fd, + }); + + String path; + + String? name; + + int fd; + + Object encode() { + return [ + path, + name, + fd, + ]; + } + + static FileResponse decode(Object result) { + result as List; + return FileResponse( + path: result[0]! as String, + name: result[1] as String?, + fd: result[2]! as int, + ); + } +} + +class FileTypes { + FileTypes({ + required this.mimeTypes, + required this.extensions, + }); + + List mimeTypes; + + List extensions; + + Object encode() { + return [ + mimeTypes, + extensions, + ]; + } + + static FileTypes decode(Object result) { + result as List; + return FileTypes( + mimeTypes: (result[0] as List?)!.cast(), + extensions: (result[1] as List?)!.cast(), + ); + } +} + +class _FileSelectorApiCodec extends StandardMessageCodec { + const _FileSelectorApiCodec(); + @override + void writeValue(WriteBuffer buffer, Object? value) { + if (value is FileResponse) { + buffer.putUint8(128); + writeValue(buffer, value.encode()); + } else if (value is FileTypes) { + buffer.putUint8(129); + writeValue(buffer, value.encode()); + } else { + super.writeValue(buffer, value); + } + } + + @override + Object? readValueOfType(int type, ReadBuffer buffer) { + switch (type) { + case 128: + return FileResponse.decode(readValue(buffer)!); + case 129: + return FileTypes.decode(readValue(buffer)!); + default: + return super.readValueOfType(type, buffer); + } + } +} + +/// An API to call to native code to select files or directories. +class FileSelectorApi { + /// Constructor for [FileSelectorApi]. The [binaryMessenger] named argument is + /// available for dependency injection. If it is left null, the default + /// BinaryMessenger will be used which routes to the host platform. + FileSelectorApi({BinaryMessenger? binaryMessenger}) + : _binaryMessenger = binaryMessenger; + final BinaryMessenger? _binaryMessenger; + + static const MessageCodec codec = _FileSelectorApiCodec(); + + /// Opens a file dialog for loading files and returns a file path. + /// + /// Returns `null` if user cancels the operation. + Future openFileByPath(String path) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.FileSelectorApi.openFileByPath', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([path]) + as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return (replyList[0] as int?); + } + } + +} diff --git a/packages/camera/camera_ohos/example/lib/main.dart b/packages/camera/camera_ohos/example/lib/main.dart index 14da8e20e..8d4b760a6 100644 --- a/packages/camera/camera_ohos/example/lib/main.dart +++ b/packages/camera/camera_ohos/example/lib/main.dart @@ -15,6 +15,7 @@ import 'package:video_player/video_player.dart'; import 'camera_controller.dart'; import 'camera_preview.dart'; +import 'fileselector/file_selector.dart'; /// Camera example home widget. class CameraExampleHome extends StatefulWidget { @@ -994,11 +995,15 @@ class _CameraExampleHomeState extends State if (videoFile == null) { return; } - return; - print("========videoFile!.path is: "+videoFile!.path); - int fd = int.parse(videoFile!.path); - final VideoPlayerController vController = VideoPlayerController.fileFd(fd); - print("========fileFd is: "+videoFile!.path); + final VideoPlayerController vController; + if (Platform.operatingSystem == 'ohos') { + final FileSelector instance = FileSelector(); + int? fileFd = await instance.openFileByPath(videoFile!.path); + vController = VideoPlayerController.fileFd(fileFd!); + } else { + vController = kIsWeb? VideoPlayerController.network(videoFile!.path) + : VideoPlayerController.file(File(videoFile!.path)); + } videoPlayerListener = () { if (videoController != null) { // Refreshing the state to update video player with the correct ratio. diff --git a/packages/camera/camera_ohos/example/ohos/entry/src/main/ets/entryability/EntryAbility.ets b/packages/camera/camera_ohos/example/ohos/entry/src/main/ets/entryability/EntryAbility.ets index ec04251da..4520247a1 100644 --- a/packages/camera/camera_ohos/example/ohos/entry/src/main/ets/entryability/EntryAbility.ets +++ b/packages/camera/camera_ohos/example/ohos/entry/src/main/ets/entryability/EntryAbility.ets @@ -16,10 +16,12 @@ import { FlutterAbility } from '@ohos/flutter_ohos' import { GeneratedPluginRegistrant } from '../plugins/GeneratedPluginRegistrant'; import FlutterEngine from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterEngine'; +import FileSelectorOhosPlugin from '../fileselector/FileSelectorOhosPlugin'; export default class EntryAbility extends FlutterAbility { configureFlutterEngine(flutterEngine: FlutterEngine) { super.configureFlutterEngine(flutterEngine) GeneratedPluginRegistrant.registerWith(flutterEngine) + this.addPlugin(new FileSelectorOhosPlugin()); } } diff --git a/packages/camera/camera_ohos/example/ohos/entry/src/main/ets/fileselector/FileSelector.ets b/packages/camera/camera_ohos/example/ohos/entry/src/main/ets/fileselector/FileSelector.ets new file mode 100644 index 000000000..87268e044 --- /dev/null +++ b/packages/camera/camera_ohos/example/ohos/entry/src/main/ets/fileselector/FileSelector.ets @@ -0,0 +1,82 @@ +/* +* Copyright (c) 2024 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 fs from '@ohos.file.fs'; +import Log from '@ohos/flutter_ohos/src/main/ets/util/Log'; +import { Result, FileSelectorApiCodec} from './GeneratedFileSelectorApi' +import { BinaryMessenger } from '@ohos/flutter_ohos/src/main/ets/plugin/common/BinaryMessenger'; +import MessageCodec from '@ohos/flutter_ohos/src/main/ets/plugin/common/MessageCodec'; +import BasicMessageChannel, { Reply } from '@ohos/flutter_ohos/src/main/ets/plugin/common/BasicMessageChannel'; +import { AbilityPluginBinding } from '@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/ability/AbilityPluginBinding'; +import ArrayList from '@ohos.util.ArrayList'; + +const TAG = "FileSelector"; +export class FileSelector { + + binding: AbilityPluginBinding; + + constructor(binding: AbilityPluginBinding) { + this.binding = binding; + } + + async openFileByPath(path: string, result: Result): Promise { + try { + let file = await fs.open(path); + result.success(file.fd); + } catch (err) { + Log.e(TAG, 'open file failed with err: ' + err); + result.error(new Error("Failed to read file")); + } + } + + static getCodec(): MessageCodec { + return FileSelectorApiCodec.INSTANCE; + } + + setup(binaryMessenger: BinaryMessenger, abilityPluginBinding: AbilityPluginBinding): void { + let api = this; + { + this.binding = abilityPluginBinding; + const channel: BasicMessageChannel = new BasicMessageChannel( + binaryMessenger, "dev.flutter.FileSelectorApi.openFileByPath", FileSelector.getCodec()); + channel.setMessageHandler({ + onMessage(msg: ESObject, reply: Reply): void { + Log.d(TAG, 'onMessage reply:' + reply) + const wrapped: Array = new Array(); + const args: Array = msg as Array; + const path = args[0] as string; + const resultCallback: Result = new ResultBuilder((result: number): void => { + wrapped.push(result); + reply.reply(wrapped); + },(error: Error): void => { + const wrappedError: ArrayList = msg.wrapError(error); + reply.reply(wrappedError); + }) + api.openFileByPath(path, resultCallback); + } + }); + } + } +} + +class ResultBuilder{ + success : (result: number)=>void + error: (error: Error) =>void + + constructor(success:ESObject , error:ESObject) { + this.success = success + this.error = error + } +} \ No newline at end of file diff --git a/packages/camera/camera_ohos/example/ohos/entry/src/main/ets/fileselector/FileSelectorOhosPlugin.ets b/packages/camera/camera_ohos/example/ohos/entry/src/main/ets/fileselector/FileSelectorOhosPlugin.ets new file mode 100644 index 000000000..2b3e4179e --- /dev/null +++ b/packages/camera/camera_ohos/example/ohos/entry/src/main/ets/fileselector/FileSelectorOhosPlugin.ets @@ -0,0 +1,56 @@ +/* +* Copyright (c) 2024 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 AbilityAware from '@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/ability/AbilityAware'; +import { + AbilityPluginBinding +} from '@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/ability/AbilityPluginBinding'; +import { + FlutterPlugin, + FlutterPluginBinding +} from '@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/FlutterPlugin'; +import { FileSelector } from './FileSelector' + +const TAG = "FileSelectorOhosPlugin" + +export default class FileSelectorOhosPlugin implements FlutterPlugin, AbilityAware { + + private pluginBinding: FlutterPluginBinding | null = null; + private fileSelectorApi: FileSelector | null = null; + + getUniqueClassName(): string { + return "FileSelectorOhosPlugin" + } + + onAttachedToAbility(binding: AbilityPluginBinding): void { + this.fileSelectorApi = new FileSelector(binding); + if (this.pluginBinding != null) { + this.fileSelectorApi.setup(this.pluginBinding.getBinaryMessenger(), binding); + } + } + + onDetachedFromAbility(): void { + this.fileSelectorApi = null; + } + + onAttachedToEngine(binding: FlutterPluginBinding): void { + console.debug(TAG, 'onAttachedToEngine file selector ') + this.pluginBinding = binding; + } + + onDetachedFromEngine(binding: FlutterPluginBinding): void { + this.pluginBinding = null; + } +} \ No newline at end of file diff --git a/packages/camera/camera_ohos/example/ohos/entry/src/main/ets/fileselector/GeneratedFileSelectorApi.ets b/packages/camera/camera_ohos/example/ohos/entry/src/main/ets/fileselector/GeneratedFileSelectorApi.ets new file mode 100644 index 000000000..2d1f8cbe2 --- /dev/null +++ b/packages/camera/camera_ohos/example/ohos/entry/src/main/ets/fileselector/GeneratedFileSelectorApi.ets @@ -0,0 +1,194 @@ +/* +* Copyright (c) 2024 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 { ByteBuffer } from '@ohos/flutter_ohos/src/main/ets/util/ByteBuffer'; +import StandardMessageCodec from '@ohos/flutter_ohos/src/main/ets/plugin/common/StandardMessageCodec'; +import Log from '@ohos/flutter_ohos/src/main/ets/util/Log'; + +const TAG = "GeneratedFileSelectorApi"; + +class FlutterError extends Error { + /** The error code. */ + public code: string; + + /** The error details. Must be a datatype supported by the api codec. */ + public details: ESObject; + + constructor(code: string, message: string, details: ESObject) { + super(message); + this.code = code; + this.details = details; + } +} + +export function wrapError(exception: Error): Array { + let errorList: Array = new Array(); + if (exception instanceof FlutterError) { + let error = exception as FlutterError; + errorList.push(error.code); + errorList.push(error.message); + errorList.push(error.details); + } else { + errorList.push(exception.toString()); + errorList.push(exception.name); + errorList.push( + "Cause: " + exception.message + ", Stacktrace: " + exception.stack); + } + return errorList; +} + +export class FileResponse { + private path: string; + + public getPath(): string { + return this.path; + } + + public setPath(setterArg: string): void { + if (setterArg == null) { + throw new Error('Nonnull field \'path\' is null.'); + } + this.path = setterArg; + } + + private name: string; + + public getName(): string { + return this.name; + } + + public setName(setterArg: string): void { + this.name = setterArg; + } + + private fd: number; + + public getFd(): number { + return this.fd; + } + + public setFd(setterArg: number): void { + if (setterArg == null) { + throw new Error("Nonnull field \"fd\" is null."); + } + this.fd = setterArg; + } + + constructor(path: string, name: string, fd: number) { + this.path = path; + this.name = name; + this.fd = fd; + } + + toList(): Array { + let toListResult: Array = new Array(); + toListResult.push(this.path); + toListResult.push(this.name); + toListResult.push(this.fd); + return toListResult; + } + + static fromList(list: Array): FileResponse { + let path: ESObject = list[0]; + let name: ESObject = list[1]; + let fd: ESObject = list[2]; + let response = new FileResponse(path, name, fd); + return response; + } +} + +export class FileTypes { + mimeTypes: Array = []; + + getMimeTypes(): Array { + return this.mimeTypes; + } + + setMimeTypes(setterArg: Array | null): void { + if (setterArg == null) { + throw new Error("Nonnull field \"mimeTypes\" is null."); + } + this.mimeTypes = setterArg; + } + + extensions: Array = []; + + getExtensions(): Array { + return this.extensions; + } + + setExtensions(setterArg: Array): void { + if (setterArg == null) { + throw new Error("Nonnull field \"extensions\" is null."); + } + this.extensions = setterArg; + } + + /** Constructor is non-public to enforce null safety; use Builder. */ + FileTypes() {} + + toList(): Array { + let toListResult: Array = new Array(); + toListResult.push(this.mimeTypes); + toListResult.push(this.extensions); + return toListResult; + } + + static fromList(list: Array): FileTypes { + let pigeonResult = new FileTypes(); + let mimeTypes: ESObject = list[0]; + pigeonResult.setMimeTypes(mimeTypes as Array); + let extensions: ESObject = list[1]; + pigeonResult.setExtensions(extensions as Array); + return pigeonResult; + } +} + + +export interface Result { + success(result: T): void; + error(error: Error): void; +} + +export class FileSelectorApiCodec extends StandardMessageCodec { + public static INSTANCE = new FileSelectorApiCodec(); + + readValueOfType(type: number, buffer: ByteBuffer): ESObject { + switch (type) { + case 128: + let res0 = FileResponse.fromList(super.readValue(buffer) as Array); + return res0; + case 129: + let vur: ESObject = super.readValue(buffer) + let res1 = FileTypes.fromList(vur as Array); + return res1; + default: + let res2: ESObject = super.readValueOfType(type, buffer); + return res2; + } + } + + writeValue(stream: ByteBuffer, value: ESObject): ESObject { + if (value instanceof FileResponse) { + stream.writeInt8(128); + return this.writeValue(stream, (value as FileResponse).toList()); + } else if (value instanceof FileTypes) { + stream.writeInt8(129); + return this.writeValue(stream, (value as FileTypes).toList()); + } else { + return super.writeValue(stream, value); + } + } + } diff --git a/packages/camera/camera_ohos/example/ohos/entry/src/main/module.json5 b/packages/camera/camera_ohos/example/ohos/entry/src/main/module.json5 index 9529400a6..7bac7c502 100644 --- a/packages/camera/camera_ohos/example/ohos/entry/src/main/module.json5 +++ b/packages/camera/camera_ohos/example/ohos/entry/src/main/module.json5 @@ -28,6 +28,7 @@ { "name": "EntryAbility", "srcEntry": "./ets/entryability/EntryAbility.ets", + "orientation": "auto_rotation", "description": "$string:EntryAbility_desc", "icon": "$media:icon", "label": "$string:EntryAbility_label", @@ -51,7 +52,64 @@ "name": "ohos.permission.INTERNET" }, { - "name": "ohos.permission.CAMERA" + "name": "ohos.permission.CAMERA", + "reason": "$string:reason", + "usedScene": { + "abilities": [ + "FormAbility" + ], + "when": "inuse" + } + }, + { + "name": "ohos.permission.MICROPHONE", + "reason": "$string:reason", + "usedScene": { + "abilities": [ + "FormAbility" + ], + "when": "inuse" + } + }, + { + "name": "ohos.permission.READ_MEDIA", + "reason": "$string:reason", + "usedScene": { + "abilities": [ + "FormAbility" + ], + "when": "inuse" + } + }, + { + "name": "ohos.permission.WRITE_MEDIA", + "reason": "$string:reason", + "usedScene": { + "abilities": [ + "FormAbility" + ], + "when": "inuse" + } + }, + { + "name": "ohos.permission.READ_IMAGEVIDEO", + "reason": "$string:reason", + "usedScene": { + "abilities": [ + "FormAbility" + ], + "when": "inuse" + } + }, + { + "name": "ohos.permission.WRITE_IMAGEVIDEO", + "reason": "$string:reason", + "usedScene": { + "abilities": [ + "FormAbility" + ], + "when": "inuse" + } }, // { // "name": "ohos.permission.CAPTURE_VOICE_DOWNLINK_AUDIO" diff --git a/packages/camera/camera_ohos/example/ohos/entry/src/main/resources/base/element/string.json b/packages/camera/camera_ohos/example/ohos/entry/src/main/resources/base/element/string.json index 67e0f4ff4..aa3c490ac 100644 --- a/packages/camera/camera_ohos/example/ohos/entry/src/main/resources/base/element/string.json +++ b/packages/camera/camera_ohos/example/ohos/entry/src/main/resources/base/element/string.json @@ -11,6 +11,10 @@ { "name": "EntryAbility_label", "value": "example" + }, + { + "name": "reason", + "value": "example" } ] } \ No newline at end of file diff --git a/packages/camera/camera_ohos/example/ohos/entry/src/main/resources/en_US/element/string.json b/packages/camera/camera_ohos/example/ohos/entry/src/main/resources/en_US/element/string.json index 67e0f4ff4..aa3c490ac 100644 --- a/packages/camera/camera_ohos/example/ohos/entry/src/main/resources/en_US/element/string.json +++ b/packages/camera/camera_ohos/example/ohos/entry/src/main/resources/en_US/element/string.json @@ -11,6 +11,10 @@ { "name": "EntryAbility_label", "value": "example" + }, + { + "name": "reason", + "value": "example" } ] } \ No newline at end of file -- Gitee From 1b3e0bd65d2d8b22eba5a50eef7e03ee26f80864 Mon Sep 17 00:00:00 2001 From: liuyuehu <3455278857@qq.com> Date: Mon, 8 Apr 2024 21:05:06 +0800 Subject: [PATCH 2/2] =?UTF-8?q?camera:=E4=BF=AE=E6=94=B9example=E7=9A=84pu?= =?UTF-8?q?bspec.yaml=E6=96=87=E4=BB=B6=20Signed-off-by:=20liuyuehu=20<345?= =?UTF-8?q?5278857@qq.com>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../camera_ohos/example/ohos/entry/oh-package.json5 | 1 - packages/camera/camera_ohos/example/pubspec.yaml | 9 +-------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/packages/camera/camera_ohos/example/ohos/entry/oh-package.json5 b/packages/camera/camera_ohos/example/ohos/entry/oh-package.json5 index 99262ce3f..9fbe20403 100644 --- a/packages/camera/camera_ohos/example/ohos/entry/oh-package.json5 +++ b/packages/camera/camera_ohos/example/ohos/entry/oh-package.json5 @@ -21,7 +21,6 @@ author: '', license: '', dependencies: { - '@ohos/integration_test': 'file:./har/integration_test.har', '@ohos/camera_ohos': 'file:./har/camera_ohos.har', }, } \ No newline at end of file diff --git a/packages/camera/camera_ohos/example/pubspec.yaml b/packages/camera/camera_ohos/example/pubspec.yaml index b3f790acc..1c33ad84e 100644 --- a/packages/camera/camera_ohos/example/pubspec.yaml +++ b/packages/camera/camera_ohos/example/pubspec.yaml @@ -30,10 +30,7 @@ dependencies: camera_platform_interface: ^2.5.0 flutter: sdk: flutter - path_provider: - git: - url: "https://gitee.com/openharmony-sig/flutter_packages.git" - path: "packages/path_provider/path_provider" + path_provider: ^2.0.0 quiver: ^3.0.0 video_player: git: @@ -44,10 +41,6 @@ dev_dependencies: build_runner: ^2.1.10 flutter_driver: sdk: flutter - flutter_test: - sdk: flutter - integration_test: - sdk: flutter flutter: uses-material-design: true -- Gitee