Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
1,437 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/node_modules | ||
/oh_modules | ||
/local.properties | ||
/.idea | ||
**/build | ||
/.hvigor | ||
.cxx | ||
/.clangd | ||
/.clang-format | ||
/.clang-tidy | ||
**/.test | ||
entry/libs/arm64-v8a/libapp.so | ||
entry/libs/arm64-v8a/libflutter.so | ||
entry/libs/arm64-v8a/libvmservice_snapshot.so | ||
entry/src/main/resources/rawfile/flutter_assets/ | ||
har/flutter.har | ||
oh-package-lock.json5 | ||
dta |
10 changes: 10 additions & 0 deletions
10
packages/flutter_image_compress/example/ohos/AppScope/app.json5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"app": { | ||
"bundleName": "com.fluttercandies.example", | ||
"vendor": "example", | ||
"versionCode": 1000000, | ||
"versionName": "1.0.0", | ||
"icon": "$media:app_icon", | ||
"label": "$string:app_name" | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
packages/flutter_image_compress/example/ohos/AppScope/resources/base/element/string.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"string": [ | ||
{ | ||
"name": "app_name", | ||
"value": "example" | ||
} | ||
] | ||
} |
Binary file added
BIN
+6.63 KB
.../flutter_image_compress/example/ohos/AppScope/resources/base/media/app_icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions
43
packages/flutter_image_compress/example/ohos/build-profile.json5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
{ | ||
"app": { | ||
"signingConfigs": [], | ||
"products": [ | ||
{ | ||
"name": "default", | ||
"signingConfig": "default", | ||
"compileSdkVersion": "4.1.0(11)", | ||
"compatibleSdkVersion": "4.1.0(11)", | ||
"runtimeOS": "HarmonyOS", | ||
} | ||
] | ||
}, | ||
"modules": [ | ||
{ | ||
"name": "entry", | ||
"srcPath": "./entry", | ||
"targets": [ | ||
{ | ||
"name": "default", | ||
"applyToProducts": [ | ||
"default" | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
packages/flutter_image_compress/example/ohos/entry/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
/node_modules | ||
/oh_modules | ||
/.preview | ||
/build | ||
/.cxx | ||
/.test | ||
/har | ||
/libs |
29 changes: 29 additions & 0 deletions
29
packages/flutter_image_compress/example/ohos/entry/build-profile.json5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
{ | ||
"apiType": 'stageMode', | ||
"buildOption": { | ||
}, | ||
"targets": [ | ||
{ | ||
"name": "default", | ||
"runtimeOS": "HarmonyOS" | ||
}, | ||
{ | ||
"name": "ohosTest", | ||
} | ||
] | ||
} |
17 changes: 17 additions & 0 deletions
17
packages/flutter_image_compress/example/ohos/entry/hvigorfile.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently. | ||
export { hapTasks } from '@ohos/hvigor-ohos-plugin'; |
12 changes: 12 additions & 0 deletions
12
packages/flutter_image_compress/example/ohos/entry/oh-package.json5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
name: 'entry', | ||
version: '1.0.0', | ||
description: 'Please describe the basic information.', | ||
main: '', | ||
author: '', | ||
license: '', | ||
dependencies: { | ||
'@ohos/path_provider_ohos': 'file:./har/path_provider_ohos.har', | ||
'@ohos/flutter_image_compress_ohos': 'file:./har/flutter_image_compress_ohos.har', | ||
}, | ||
} |
30 changes: 30 additions & 0 deletions
30
...ages/flutter_image_compress/example/ohos/entry/src/main/ets/entryability/EntryAbility.ets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* 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 { FlutterAbility } from '@ohos/flutter_ohos' | ||
import { FlutterPlugin } from '@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/FlutterPlugin'; | ||
import { GeneratedPluginRegistrant } from '../plugins/GeneratedPluginRegistrant'; | ||
import List from '@ohos.util.List'; | ||
import FlutterEngine from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterEngine'; | ||
|
||
export default class EntryAbility extends FlutterAbility { | ||
configureFlutterEngine(flutterEngine: FlutterEngine) { | ||
super.configureFlutterEngine(flutterEngine) | ||
let plugins = GeneratedPluginRegistrant.getPlugins() as List<FlutterPlugin>; | ||
plugins.forEach((plugin) => { | ||
this.addPlugin(plugin); | ||
}) | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
packages/flutter_image_compress/example/ohos/entry/src/main/ets/pages/Index.ets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* 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 { FlutterPage } from '@ohos/flutter_ohos' | ||
|
||
let storage = LocalStorage.getShared() | ||
const EVENT_BACK_PRESS = 'EVENT_BACK_PRESS' | ||
|
||
@Entry(storage) | ||
@Component | ||
struct Index { | ||
private context = getContext(this) as common.UIAbilityContext | ||
@LocalStorageLink('viewId') viewId: string = ""; | ||
|
||
build() { | ||
Column() { | ||
FlutterPage({ viewId: this.viewId }) | ||
} | ||
} | ||
|
||
onBackPress(): boolean { | ||
this.context.eventHub.emit(EVENT_BACK_PRESS) | ||
return true | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...tter_image_compress/example/ohos/entry/src/main/ets/plugins/GeneratedPluginRegistrant.ets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { FlutterPlugin } from '@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/FlutterPlugin'; | ||
import List from '@ohos.util.List'; | ||
import FlutterImageCompressOhosPlugin from '@ohos/flutter_image_compress_ohos' | ||
import PathProviderPlugin from '@ohos/path_provider_ohos' | ||
|
||
/** | ||
* Generated file. Do not edit. | ||
* This file is generated by the Flutter tool based on the | ||
* plugins that support the Ohos platform. | ||
*/ | ||
export class GeneratedPluginRegistrant { | ||
static getPlugins(): List<FlutterPlugin> { | ||
let pluginList : List<FlutterPlugin> = new List(); | ||
pluginList.add(new FlutterImageCompressOhosPlugin()); | ||
pluginList.add(new PathProviderPlugin()); | ||
return pluginList; | ||
} | ||
} |
Oops, something went wrong.