Open hhstore opened 3 years ago
二者区别:
创建指令:
flutter create --template=package hello
@JS()
wrap 原生 js lib 给 dart 使用. Android/iOS
原生 lib. 创建指令:
# Android:
flutter create --org com.example --template=plugin --platforms=android,ios -a kotlin hello
flutter create --org com.example --template=plugin --platforms=android,ios -a java hello
# iOS:
flutter create --org com.example --template=plugin --platforms=android,ios -i objc hello
flutter create --org com.example --template=plugin --platforms=android,ios -i swift hello
flutter create --template=plugin --platforms=web .
# 测试:
flutter pub publish --dry-run
# 发布:
flutter pub publish
查找动态库:
Android 依赖包:
特别说明:
package eu.simonbinder.sqlite3_flutter_libs;
1
示例配置:
添加二进制包(闭源)
⭐️⭐️⭐️⭐️
https://docs.flutter.dev/development/platform-integration/macos/c-interop
静态链接中的符号可以使用 DynamicLibrary.executable 或 DynamicLibrary.process 来加载。
相比之下,动态链接库则分布在应用程序中的单独的文件或文件夹中,并按需加载。
在 macOS 上,它是作为 .framework 文件夹分发的。
示例:
# 激活工具:
dart pub global activate melos
function set.proxy.flutter.cn(){
# mirror: https://mirrors.tuna.tsinghua.edu.cn/help/flutter/
# 社区:
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
# 清华大学:
#export FLUTTER_STORAGE_BASE_URL="https://mirrors.tuna.tsinghua.edu.cn/flutter"
#export PUB_HOSTED_URL="https://mirrors.tuna.tsinghua.edu.cn/dart-pub"
}
# defalut use cn mirror:
set.proxy.flutter.cn
# unset:
function unset.proxy.flutter() {
unset PUB_HOSTED_URL
unset FLUTTER_STORAGE_BASE_URL
export PUB_HOSTED_URL=""
export FLUTTER_STORAGE_BASE_URL=""
echo "unset flutter proxy"
}
related: