There are two main forms of HarmonyOS Flutter hybrid development.
1. Harr-based
The Flutter module is packaged into a HAR package, which is introduced in the form of a HAR package in the native HarmonyOS project.
The advantage is that the main project developer can not pay attention to the Flutter implementation, and there is no need to install and configure the Flutter development environment, and the disadvantage is that the Flutter code cannot be modified in time, and there is no hot reload.
2.Based on source code
At the time of the source code dependency, the Flutter module was introduced in the native HarmonyOS project.
The advantage is that it is easy to maintain and update Flutter code, and hot reload can also be used. The disadvantage is that you need to set up a Flutter development environment, and developers need to master Flutter.
The project structure is similar to the following:
.
├── AppScope
│ ├── app.json5
│ └── resources
│ ├── base
│ └── rawfile
├── build-profile.json5
├── dependencies
│ ├── hvigor-4.1.1.tgz
│ ├── hvigor-ohos-arkui-x-plugin-3.1.0.tgz
│ └── hvigor-ohos-plugin-4.1.1.tgz
├── entry
│ ├── build-profile.json5
│ ├── hvigorfile.ts
│ ├── oh-package.json5
│ └── src
│ └── main
├── flutter_module
│ ├── BuildProfile.ets
│ ├── Index.ets
│ ├── build-profile.json5
│ ├── consumer-rules.txt
│ ├── hvigorfile.ts
│ ├── libs
│ │ └── arm64-v8a
│ ├── obfuscation-rules.txt
│ ├── oh-package.json5
│ └── src
│ ├── main
│ ├── ohosTest
│ └── test
├── har
│ ├── GT-HM-1.0.4.har
│ ├── flutter.har
│ ├── flutter_boost.har
│ ├── flutter_module.har
│ └── lib_base.har
├── hvigor
│ └── hvigor-config.json5
├── hvigorfile.ts
├── local.properties
├── oh-package.json5
├── package-lock.json
└── package.json
Top comments (0)