Commit 62f19de7 authored by GoldMask's avatar GoldMask

init

parents
.DS_Store
.dart_tool/
.idea
.packages
.pub/
build/
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
version:
revision: f7a6a7906be96d2288f5d63a5a54c515a6e987fe
channel: stable
project_type: plugin
## 0.0.1
* TODO: Describe initial release.
TODO: Add your license here.
# baichuan
百川SDK
## Getting Started
This project is a starting point for a Flutter
[plug-in package](https://flutter.dev/developing-packages/),
a specialized package that includes platform-specific implementation code for
Android and/or iOS.
For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
group 'com.qiaomeng.flutter.baichuan'
version '1.0'
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
}
}
rootProject.allprojects {
repositories {
google()
jcenter()
maven {
url "http://repo.baichuan-android.taobao.com/content/groups/BaichuanRepositories/"
}
}
}
apply plugin: 'com.android.library'
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 16
consumerProguardFiles 'proguard-rules.pro'
}
lintOptions {
disable 'InvalidPackage'
}
}
dependencies {
api 'androidx.appcompat:appcompat:1.2.0'
api 'androidx.cardview:cardview:1.0.0'
// 登陆
api 'com.alibaba.baichuan.sdk:alibclogin:5.0.0.7'
// applink
api 'com.alibaba.baichuan.sdk:alibcapplink:5.0.0.7'
// 广告SDK
api 'com.alibaba.baichuan.sdk:alibcad:5.0.0.7'
// 小程序
api 'com.alibaba.baichuan.sdk:alibctriver:5.0.0.7'
// c++基础库(如果工程中没有接入该so包:libc++_shared.so,需要接入该sdk)
api "llvm.stl:cpp_shared:0.0.3@aar"
// 直播
api 'com.alibaba.baichuan.sdk:alibctriver_live:5.0.0.7'
// webview容器
api 'com.alibaba.baichuan.sdk:alibcwebview:5.0.0.7'
// 电商基础组件
api 'com.alibaba.baichuan.sdk:alibctradecommon:5.0.0.7'
api 'com.alibaba.baichuan.sdk:alibcnbtrade:5.0.0.7'
api 'com.alibaba.baichuan.sdk:alibcprotocol:5.0.0.7'
api 'com.alibaba:fastjson:1.1.71.android'
api 'com.facebook.fresco:fresco:1.5.0'
api 'com.facebook.fresco:animated-gif:1.5.0'//加载gif动图需添加此库
}
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
-keepattributes Signature
-ignorewarnings
-keep class javax.ws.rs.** { *; }
-keep class com.alibaba.fastjson.** { *; }
-dontwarn com.alibaba.fastjson.**
-keep class sun.misc.Unsafe { *; }
-dontwarn sun.misc.**
-keep class com.taobao.** {*;}
-keep class com.alibaba.** {*;}
-keep class com.alipay.** {*;}
-dontwarn com.taobao.**
-dontwarn com.alibaba.**
-dontwarn com.alipay.**
-keep class com.ut.** {*;}
-dontwarn com.ut.**
-keep class com.ta.** {*;}
-dontwarn com.ta.**
-keep class org.json.** {*;}
-keep class com.ali.auth.** {*;}
-dontwarn com.ali.auth.**
-keep class com.taobao.securityjni.** {*;}
-keep class com.taobao.wireless.security.** {*;}
-keep class com.taobao.dp.**{*;}
-keep class com.alibaba.wireless.security.**{*;}
-keep interface mtopsdk.mtop.global.init.IMtopInitTask {*;}
-keep class * implements mtopsdk.mtop.global.init.IMtopInitTask {*;}
\ No newline at end of file
rootProject.name = 'baichuan'
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.qiaomeng.flutter.baichuan">
</manifest>
package com.qiaomeng.flutter.baichuan;
import androidx.annotation.NonNull;
import com.qiaomeng.flutter.baichuan.handlers.BCApiHandler;
import java.util.Map;
import io.flutter.embedding.engine.plugins.FlutterPlugin;
import io.flutter.embedding.engine.plugins.activity.ActivityAware;
import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding;
import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel;
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
import io.flutter.plugin.common.MethodChannel.Result;
import io.flutter.plugin.common.PluginRegistry.Registrar;
/**
* BaichuanPlugin
*/
public class BaichuanPlugin implements FlutterPlugin, MethodCallHandler, ActivityAware {
private static String CHANNEL_NAME = "com.qiaomeng.flutter/baichuan";
private MethodChannel channel;
private BCApiHandler bcApiHandler;
@Override
public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBinding) {
channel = new MethodChannel(flutterPluginBinding.getBinaryMessenger(), CHANNEL_NAME);
channel.setMethodCallHandler(this);
}
@Override
public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
String method = call.method;
if (method.equals("debug")) {
bcApiHandler.debug();
} else if (method.equals("asyncInit")) {
bcApiHandler.asyncInit(result);
} else if (method.equals("setIsvVersion")) {
bcApiHandler.setIsvVersion((String) call.arguments);
} else if (method.equals("showLogin")) {
bcApiHandler.showLogin(result);
} else if (method.equals("logout")) {
bcApiHandler.logout(result);
} else if (method.equals("openByCode")) {
String suiteCode = call.argument("suiteCode");
Map bizParams = call.argument("bizParams");
Map showParams = call.argument("showParams");
Map taokeParams = call.argument("taokeParams");
Map trackParams = call.argument("trackParams");
bcApiHandler.openByCode(
suiteCode,
bizParams,
showParams,
taokeParams,
trackParams,
result
);
} else if (method.equals("openByUrl")) {
String detailUrl = call.argument("detailUrl");
Map showParams = call.argument("showParams");
Map taokeParams = call.argument("taokeParams");
Map trackParams = call.argument("trackParams");
bcApiHandler.openByUrl(
detailUrl,
showParams,
taokeParams,
trackParams,
result
);
} else if (method.equals("registerNavigateUrl")) {
bcApiHandler.registerNavigateUrl();
} else if (method.equals("isLogin")) {
bcApiHandler.isLogin(result);
} else if (method.equals("getUserInfo")) {
bcApiHandler.getUserInfo(result);
} else if (method.equals("registerImage")) {
bcApiHandler.registerImage();
} else {
result.notImplemented();
}
}
@Override
public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) {
channel.setMethodCallHandler(null);
}
@Override
public void onAttachedToActivity(@NonNull ActivityPluginBinding binding) {
bcApiHandler = new BCApiHandler(binding.getActivity(), channel);
}
@Override
public void onDetachedFromActivityForConfigChanges() {
}
@Override
public void onReattachedToActivityForConfigChanges(@NonNull ActivityPluginBinding binding) {
}
@Override
public void onDetachedFromActivity() {
}
}
package com.qiaomeng.flutter.baichuan.handlers;
import android.app.Activity;
import android.content.Context;
import android.os.Handler;
import android.os.Looper;
import androidx.annotation.MainThread;
import com.alibaba.alibclogin.AlibcLogin;
import com.alibaba.alibcprotocol.callback.AlibcLoginCallback;
import com.alibaba.alibcprotocol.param.AlibcBizParams;
import com.alibaba.alibcprotocol.param.AlibcDegradeType;
import com.alibaba.alibcprotocol.param.AlibcShowParams;
import com.alibaba.alibcprotocol.param.AlibcTaokeParams;
import com.alibaba.alibcprotocol.param.OpenType;
import com.alibaba.alibctriver.AlibcImageCenter;
import com.alibaba.alibctriver.AlibcNavigateCenter;
import com.alibaba.baichuan.trade.common.AlibcTradeCommon;
import com.baichuan.nb_trade.AlibcTrade;
import com.baichuan.nb_trade.callback.AlibcTradeCallback;
import com.baichuan.nb_trade.callback.AlibcTradeInitCallback;
import com.baichuan.nb_trade.core.AlibcTradeBiz;
import com.baichuan.nb_trade.core.AlibcTradeSDK;
import com.facebook.drawee.backends.pipeline.Fresco;
import java.util.HashMap;
import java.util.Map;
import io.flutter.plugin.common.MethodChannel;
public class BCApiHandler {
private static String TAG = "BCApiHandler";
private Activity context;
private MethodChannel channel;
public BCApiHandler(Activity context, MethodChannel channel) {
this.context = context;
this.channel = channel;
Fresco.initialize(context);
AlibcTradeCommon.turnOffDebug();
AlibcTradeBiz.turnOffDebug();
AlibcTradeCommon.closeErrorLog();
}
/**
* 开启调试模式
*/
public void debug() {
AlibcTradeCommon.turnOnDebug();
AlibcTradeCommon.openErrorLog();
AlibcTradeBiz.turnOnDebug();
}
/**
* 初始化
*
* @param result
*/
public void asyncInit(final MethodChannel.Result result) {
// 初始化扩展map(默认可传入空)
Map<String, Object> params = new HashMap<>();
params.put("open4GDownload", true);
AlibcTradeSDK.asyncInit(context.getApplication(), params, new AlibcTradeInitCallback() {
@Override
public void onSuccess() {
Map map = new HashMap();
map.put("status", true);
map.put("msg", "SDK初始化成功");
result.success(map);
}
@Override
public void onFailure(int i, String s) {
Map map = new HashMap();
map.put("status", false);
map.put("msg", s);
map.put("code", i);
result.success(map);
}
});
}
/**
* 设置三方媒体应用版本号
*
* @param v
*/
public void setIsvVersion(String v) {
AlibcTradeCommon.setIsvVersion(v);
}
/**
* 打开登录
*
* @param result
*/
public void showLogin(final MethodChannel.Result result) {
AlibcLogin.getInstance().showLogin(new AlibcLoginCallback() {
@Override
public void onSuccess(String userId, String userNick) {
Map map = new HashMap();
map.put("status", true);
map.put("msg", "登录成功");
map.put("userInfo", AlibcLogin.getInstance().getUserInfo());
result.success(map);
}
@Override
public void onFailure(int i, String s) {
Map map = new HashMap();
map.put("status", false);
map.put("msg", s);
map.put("code", i);
result.success(map);
}
});
}
/**
* 登出
*
* @param result
*/
public void logout(final MethodChannel.Result result) {
AlibcLogin.getInstance().logout(new AlibcLoginCallback() {
@Override
public void onSuccess(String userId, String userNick) {
Map map = new HashMap();
map.put("status", true);
map.put("msg", "登出成功");
map.put("userInfo", AlibcLogin.getInstance().getUserInfo());
result.success(map);
}
@Override
public void onFailure(int i, String s) {
Map map = new HashMap();
map.put("status", false);
map.put("msg", s);
map.put("code", i);
result.success(map);
}
});
}
/**
* 判断是否登录淘宝
*
* @param result
*/
public void isLogin(MethodChannel.Result result) {
Map map = new HashMap();
map.put("status", false);
map.put("msg", "淘宝未登录");
map.put("isLogin", AlibcLogin.getInstance().isLogin());
result.success(map);
}
/**
* 获取淘宝用户信息
*
* @param result
*/
public void getUserInfo(MethodChannel.Result result) {
if (AlibcLogin.getInstance().isLogin()) {
Map map = new HashMap();
map.put("status", true);
map.put("msg", "获取成功");
map.put("userInfo", AlibcLogin.getInstance().getUserInfo());
result.success(map);
} else {
Map map = new HashMap();
map.put("status", false);
map.put("msg", "淘宝未登录");
}
}
/**
* 打开电商套件页面
*
* @param suiteCode 套件code
* @param bizParams 业务参数
* @param showParams 页面打开方式自定义参数
* @param taokeParams 淘客参数
* @param trackParams 链路跟踪参数(自定义)
*/
public void openByCode(
String suiteCode,
Map<String, Object> bizParams,
Map<String, String> showParams,
Map<String, Object> taokeParams,
Map<String, String> trackParams,
final MethodChannel.Result result) {
AlibcTrade.openByCode(
context,
suiteCode,
mapToAlibcBizParams(bizParams),
mapToAlibcShowParams(showParams),
mapToAlibcTaokeParams(taokeParams),
trackParams,
new AlibcTradeCallback() {
@Override
public void onSuccess(int i) {
Map map = new HashMap();
map.put("status", true);
map.put("code", i);
map.put("msg", "打开成功");
result.success(map);
}
@Override
public void onFailure(int i, String s) {
Map map = new HashMap();
map.put("status", false);
map.put("msg", s);
map.put("code", i);
result.success(map);
}
});
}
/**
* 打开普通电商页面
*
* @param detailUrl 目标打开的url
* @param showParams 页面打开方式自定义参数
* @param taokeParams 淘客参数
* @param trackParams 链路跟踪参数(自定义)
* @param result
*/
public void openByUrl(
String detailUrl,
Map<String, String> showParams,
Map<String, Object> taokeParams,
Map<String, String> trackParams,
final MethodChannel.Result result) {
AlibcTrade.openByUrl(
context,
detailUrl,
mapToAlibcShowParams(showParams),
mapToAlibcTaokeParams(taokeParams),
trackParams,
new AlibcTradeCallback() {
@Override
public void onSuccess(int i) {
Map map = new HashMap();
map.put("status", true);
map.put("code", i);
map.put("msg", "打开成功");
result.success(map);
}
@Override
public void onFailure(int i, String s) {
Map map = new HashMap();
map.put("status", false);
map.put("msg", s);
map.put("code", i);
result.success(map);
}
});
}
/**
* 媒体外跳页面路由协议
*/
public void registerNavigateUrl() {
AlibcNavigateCenter.registerNavigateUrl(new AlibcNavigateCenter.IUrlNavigate() {
@Override
public boolean openUrl(Context context, final String s) {
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
channel.invokeMethod("registerNavigateUrl", s);
}
});
return true;
}
});
}
/**
* 注册相关图片库协议
*/
public void registerImage() {
AlibcImageCenter.registerImage(new ImageImpl());
}
private AlibcShowParams mapToAlibcShowParams(Map<String, String> map) {
AlibcShowParams params = new AlibcShowParams();
if (mapContainsKey(map, "backUrl")) {
params.setBackUrl(map.get("backUrl"));
}
if (mapContainsKey(map, "degradeUrl")) {
params.setDegradeUrl(map.get("degradeUrl"));
}
if (mapContainsKey(map, "title")) {
params.setTitle(map.get("title"));
}
if (mapContainsKey(map, "clientType")) {
if ("1".equals(map.get("clientType"))) {
params.setClientType("tmall");
} else {
params.setClientType("taobao");
}
}
if (mapContainsKey(map, "degradeType")) {
if ("0".equals(map.get("degradeType"))) {
params.setDegradeType(AlibcDegradeType.H5);
} else if ("1".equals(map.get("degradeType"))) {
params.setDegradeType(AlibcDegradeType.Download);
}
}
if (mapContainsKey(map, "openType")) {
if ("0".equals(map.get("openType"))) {
params.setOpenType(OpenType.Auto);
} else if ("1".equals(map.get("openType"))) {
params.setOpenType(OpenType.Native);
}
}
return params;
}
private AlibcBizParams mapToAlibcBizParams(Map<String, Object> map) {
AlibcBizParams params = new AlibcBizParams();
if (mapContainsKey(map, "id")) {
params.setId((String) map.get("id"));
}
if (mapContainsKey(map, "shopId")) {
params.setShopId((String) map.get("shopId"));
}
if (mapContainsKey(map, "sellerId")) {
params.setSellerId((String) map.get("sellerId"));
}
if (mapContainsKey(map, "extParams")) {
params.setExtParams((Map) map.get("extParams"));
}
return params;
}
private AlibcTaokeParams mapToAlibcTaokeParams(Map<String, Object> map) {
String pid = "";
if (mapContainsKey(map, "pid")) {
pid = (String) map.get("pid");
}
AlibcTaokeParams params = new AlibcTaokeParams(pid);
if (mapContainsKey(map, "subPid")) {
params.subPid = (String) map.get("subPid");
}
if (mapContainsKey(map, "unionId")) {
params.unionId = (String) map.get("unionId");
}
if (mapContainsKey(map, "relationId")) {
params.relationId = (String) map.get("relationId");
}
if (mapContainsKey(map, "materialSourceUrl")) {
params.materialSourceUrl = (String) map.get("materialSourceUrl");
}
if (mapContainsKey(map, "extParams")) {
params.extParams = (Map) map.get("extParams");
}
return params;
}
private boolean mapContainsKey(Map map, String key) {
return map != null && map.containsKey(key) && map.get(key) != null;
}
}
package com.qiaomeng.flutter.baichuan.handlers;
import android.app.Application;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.drawable.Animatable;
import android.graphics.drawable.BitmapDrawable;
import android.net.Uri;
import android.text.TextUtils;
import android.util.Log;
import android.widget.ImageView;
import com.alibaba.triver.kit.api.proxy.IImageProxy;
import com.facebook.common.executors.UiThreadImmediateExecutorService;
import com.facebook.common.internal.Preconditions;
import com.facebook.common.references.CloseableReference;
import com.facebook.datasource.BaseDataSubscriber;
import com.facebook.datasource.DataSource;
import com.facebook.datasource.DataSubscriber;
import com.facebook.drawee.backends.pipeline.Fresco;
import com.facebook.drawee.controller.BaseControllerListener;
import com.facebook.drawee.controller.ControllerListener;
import com.facebook.drawee.interfaces.DraweeController;
import com.facebook.drawee.view.DraweeView;
import com.facebook.imagepipeline.core.ImagePipeline;
import com.facebook.imagepipeline.image.CloseableImage;
import com.facebook.imagepipeline.image.CloseableStaticBitmap;
import com.facebook.imagepipeline.image.ImageInfo;
import com.facebook.imagepipeline.request.ImageRequest;
public class ImageImpl implements IImageProxy {
@Override
public void setImageUrl(final ImageView imageView, String s, ImageStrategy imageStrategy) {
ImageRequest request = ImageRequest.fromUri(s);
if (imageView instanceof DraweeView) {
ControllerListener controllerListener = new BaseControllerListener<ImageInfo>() {
@Override
public void onFailure(String id, Throwable throwable) {
super.onFailure(id, throwable);
}
@Override
public void onFinalImageSet(String id, ImageInfo imageInfo, Animatable animatable) {
super.onFinalImageSet(id, imageInfo, animatable);
}
@Override
public void onIntermediateImageSet(String id, ImageInfo imageInfo) {
super.onIntermediateImageSet(id, imageInfo);
}
};
DraweeController controller = Fresco.newDraweeControllerBuilder().setAutoPlayAnimations(true).setControllerListener(controllerListener).setUri(request.getSourceUri()).setImageRequest(request).build();
((DraweeView) imageView).setController(controller);
} else {
ImagePipeline imagePipeline = Fresco.getImagePipeline();
DataSource<CloseableReference<CloseableImage>> dataSource = imagePipeline.fetchDecodedImage(request, new Object());
DataSubscriber dataSubscriber = new BaseDataSubscriber<CloseableReference<CloseableImage>>() {
@Override
protected void onNewResultImpl(DataSource<CloseableReference<CloseableImage>> dataSource) {
CloseableReference<CloseableImage> imageReference = (CloseableReference) dataSource.getResult();
if (imageReference != null) {
try {
Preconditions.checkState(CloseableReference.isValid(imageReference));
CloseableImage closeableImage = (CloseableImage) imageReference.get();
if (!(closeableImage instanceof CloseableStaticBitmap)) {
throw new UnsupportedOperationException("Unrecognized image class: " + closeableImage);
}
CloseableStaticBitmap closeableStaticBitmap = (CloseableStaticBitmap) closeableImage;
imageView.setImageBitmap(closeableStaticBitmap.getUnderlyingBitmap());
} finally {
imageReference.close();
}
}
}
@Override
protected void onFailureImpl(DataSource<CloseableReference<CloseableImage>> dataSource) {
}
};
dataSource.subscribe(dataSubscriber, UiThreadImmediateExecutorService.getInstance());
}
}
@Override
public void loadImage(String s, ImageStrategy imageStrategy, final ImageListener imageListener) {
if (!TextUtils.isEmpty(s)) {
Uri uri = Uri.parse(s);
ImageRequest request = ImageRequest.fromUri(s);
ImagePipeline imagePipeline = Fresco.getImagePipeline();
DataSource<CloseableReference<CloseableImage>> dataSource = imagePipeline.fetchDecodedImage(request, new Object());
DataSubscriber dataSubscriber = new BaseDataSubscriber<CloseableReference<CloseableImage>>() {
public void onNewResultImpl(DataSource<CloseableReference<CloseableImage>> dataSource) {
CloseableReference<CloseableImage> imageReference = (CloseableReference) dataSource.getResult();
if (imageReference != null) {
try {
Preconditions.checkState(CloseableReference.isValid(imageReference));
CloseableImage closeableImage = (CloseableImage) imageReference.get();
if (!(closeableImage instanceof CloseableStaticBitmap)) {
throw new UnsupportedOperationException("Unrecognized image class: " + closeableImage);
}
CloseableStaticBitmap closeableStaticBitmap = (CloseableStaticBitmap) closeableImage;
if (imageListener != null) {
imageListener.onImageFinish(new BitmapDrawable(closeableStaticBitmap.getUnderlyingBitmap()));
}
} finally {
imageReference.close();
}
}
}
public void onFailureImpl(DataSource dataSource) {
Log.w("onFailureImpl", "fail");
}
};
dataSource.subscribe(dataSubscriber, UiThreadImmediateExecutorService.getInstance());
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/lib" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/.idea" />
<excludeFolder url="file://$MODULE_DIR$/.pub" />
<excludeFolder url="file://$MODULE_DIR$/build" />
<excludeFolder url="file://$MODULE_DIR$/example/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/example/build" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart SDK" level="project" />
<orderEntry type="library" name="Flutter Plugins" level="project" />
</component>
</module>
\ No newline at end of file
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
**/doc/api/
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/
# Web related
lib/generated_plugin_registrant.dart
# Symbolication related
app.*.symbols
# Obfuscation related
app.*.map.json
# Exceptions to above rules.
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
version:
revision: f7a6a7906be96d2288f5d63a5a54c515a6e987fe
channel: stable
project_type: app
# baichuan_example
Demonstrates how to use the baichuan plugin.
## Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 28
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.qiaomeng.flutter.baichuan_example"
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'androidx.appcompat:appcompat:1.0.0'
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.qiaomeng.flutter.baichuan_example">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.qiaomeng.flutter.baichuan_example">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:icon="@mipmap/ic_launcher"
android:label="baichuan_example"
tools:replace="android:label">
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" />
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
package com.qiaomeng.flutter.baichuan_example;
import io.flutter.embedding.android.FlutterActivity;
public class MainActivity extends FlutterActivity {
}
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">@android:color/white</item>
</style>
</resources>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.qiaomeng.flutter.baichuan_example">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
include ':app'
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
}
plugins.each { name, path ->
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
include ":$name"
project(":$name").projectDir = pluginDirectory
}
*.mode1v3
*.mode2v3
*.moved-aside
*.pbxuser
*.perspectivev3
**/*sync/
.sconsign.dblite
.tags*
**/.vagrant/
**/DerivedData/
Icon?
**/Pods/
**/.symlinks/
profile
xcuserdata
**/.generated/
Flutter/App.framework
Flutter/Flutter.framework
Flutter/Flutter.podspec
Flutter/Generated.xcconfig
Flutter/app.flx
Flutter/app.zip
Flutter/flutter_assets/
Flutter/flutter_export_environment.sh
ServiceDefinitions.json
Runner/GeneratedPluginRegistrant.*
# Exceptions to above rules.
!default.mode1v3
!default.mode2v3
!default.pbxuser
!default.perspectivev3
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>App</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
</dict>
</plist>
#include "Generated.xcconfig"
#include "Generated.xcconfig"
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
target 'Runner' do
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
97C146EB1CF9000F007C117D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
9740EEB31CF90195004384FC /* Generated.xcconfig */,
);
name = Flutter;
sourceTree = "<group>";
};
97C146E51CF9000F007C117D = {
isa = PBXGroup;
children = (
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
CF3B75C9A7D2FA2A4C99F110 /* Frameworks */,
);
sourceTree = "<group>";
};
97C146EF1CF9000F007C117D /* Products */ = {
isa = PBXGroup;
children = (
97C146EE1CF9000F007C117D /* Runner.app */,
);
name = Products;
sourceTree = "<group>";
};
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
97C147021CF9000F007C117D /* Info.plist */,
97C146F11CF9000F007C117D /* Supporting Files */,
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
);
path = Runner;
sourceTree = "<group>";
};
97C146F11CF9000F007C117D /* Supporting Files */ = {
isa = PBXGroup;
children = (
97C146F21CF9000F007C117D /* main.m */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
97C146ED1CF9000F007C117D /* Runner */ = {
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
);
buildRules = (
);
dependencies = (
);
name = Runner;
productName = Runner;
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
};
};
};
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 97C146E51CF9000F007C117D;
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
97C146ED1CF9000F007C117D /* Runner */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
97C146EC1CF9000F007C117D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Thin Binary";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
97C146EA1CF9000F007C117D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
97C146F31CF9000F007C117D /* main.m in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
97C146FB1CF9000F007C117D /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
97C147001CF9000F007C117D /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
249021D3217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Profile;
};
249021D4217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.qiaomeng.flutter.baichuanExample;
PRODUCT_NAME = "$(TARGET_NAME)";
VERSIONING_SYSTEM = "apple-generic";
};
name = Profile;
};
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
97C147041CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
97C147061CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.qiaomeng.flutter.baichuanExample;
PRODUCT_NAME = "$(TARGET_NAME)";
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
};
97C147071CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.qiaomeng.flutter.baichuanExample;
PRODUCT_NAME = "$(TARGET_NAME)";
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
97C147031CF9000F007C117D /* Debug */,
97C147041CF9000F007C117D /* Release */,
249021D3217E4FDB00AE95B9 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
97C147061CF9000F007C117D /* Debug */,
97C147071CF9000F007C117D /* Release */,
249021D4217E4FDB00AE95B9 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
</Workspace>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreviewsEnabled</key>
<false/>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Profile"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
</Workspace>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreviewsEnabled</key>
<false/>
</dict>
</plist>
#import <Flutter/Flutter.h>
#import <UIKit/UIKit.h>
@interface AppDelegate : FlutterAppDelegate
@end
#import "AppDelegate.h"
#import "GeneratedPluginRegistrant.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[GeneratedPluginRegistrant registerWithRegistry:self];
// Override point for customization after application launch.
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
@end
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon-App-1024x1024@1x.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
{
"images" : [
{
"idiom" : "universal",
"filename" : "LaunchImage.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
# Launch Screen Assets
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
</imageView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<image name="LaunchImage" width="168" height="185"/>
</resources>
</document>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--Flutter View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>baichuan_example</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
#import <Flutter/Flutter.h>
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char* argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
import 'package:baichuan/baichuan.dart';
import 'package:flutter/material.dart';
import 'dart:async';
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
String _platformVersion = 'Unknown';
@override
void initState() {
super.initState();
initPlatformState();
}
// Platform messages are asynchronous, so we initialize in an async method.
Future<void> initPlatformState() async {
String platformVersion;
// Platform messages may fail, so we use a try/catch PlatformException.
// If the widget was removed from the tree while the asynchronous platform
// message was in flight, we want to discard the reply rather than calling
// setState to update our non-existent appearance.
if (!mounted) return;
setState(() {
_platformVersion = platformVersion;
});
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Center(
child: GestureDetector(
onTap: () {
BCHandler.asyncInit().then((value) {
print(value.msg);
});
},
child: Text('Running on: 1'),
),
),
),
);
}
}
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
archive:
dependency: transitive
description:
name: archive
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"
source: hosted
version: "2.0.13"
args:
dependency: transitive
description:
name: args
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"
source: hosted
version: "1.6.0"
async:
dependency: transitive
description:
name: async
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"
source: hosted
version: "2.4.1"
baichuan:
dependency: "direct main"
description:
path: ".."
relative: true
source: path
version: "0.0.1"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"
source: hosted
version: "2.0.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"
source: hosted
version: "1.1.3"
collection:
dependency: transitive
description:
name: collection
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"
source: hosted
version: "1.14.12"
convert:
dependency: transitive
description:
name: convert
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"
source: hosted
version: "2.1.1"
crypto:
dependency: transitive
description:
name: crypto
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"
source: hosted
version: "2.1.4"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"
source: hosted
version: "0.1.3"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
image:
dependency: transitive
description:
name: image
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"
source: hosted
version: "2.1.12"
matcher:
dependency: transitive
description:
name: matcher
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"
source: hosted
version: "0.12.6"
meta:
dependency: transitive
description:
name: meta
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"
source: hosted
version: "1.1.8"
path:
dependency: transitive
description:
name: path
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"
source: hosted
version: "1.6.4"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"
source: hosted
version: "2.4.0"
quiver:
dependency: transitive
description:
name: quiver
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"
source: hosted
version: "2.1.3"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
source_span:
dependency: transitive
description:
name: source_span
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"
source: hosted
version: "1.7.0"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"
source: hosted
version: "1.9.3"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"
source: hosted
version: "2.0.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"
source: hosted
version: "1.0.5"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"
source: hosted
version: "1.1.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"
source: hosted
version: "0.2.15"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"
source: hosted
version: "1.1.6"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"
source: hosted
version: "2.0.8"
xml:
dependency: transitive
description:
name: xml
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"
source: hosted
version: "3.6.1"
sdks:
dart: ">=2.7.0 <3.0.0"
flutter: ">=1.10.0"
name: baichuan_example
description: Demonstrates how to use the baichuan plugin.
# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
baichuan:
# When depending on this package from a real application you should use:
# baichuan: ^x.y.z
# See https://dart.dev/tools/pub/dependencies#version-constraints
# The example app is bundled with the plugin so we use a path dependency on
# the parent directory to use the current plugin's version.
path: ../
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.3
dev_dependencies:
flutter_test:
sdk: flutter
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages
// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility that Flutter provides. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:baichuan_example/main.dart';
void main() {
testWidgets('Verify Platform version', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(MyApp());
// Verify that platform version is retrieved.
expect(
find.byWidgetPredicate(
(Widget widget) => widget is Text &&
widget.data.startsWith('Running on:'),
),
findsOneWidget,
);
});
}
.idea/
.vagrant/
.sconsign.dblite
.svn/
.DS_Store
*.swp
profile
DerivedData/
build/
GeneratedPluginRegistrant.h
GeneratedPluginRegistrant.m
.generated/
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
!default.pbxuser
!default.mode1v3
!default.mode2v3
!default.perspectivev3
xcuserdata
*.moved-aside
*.pyc
*sync/
Icon?
.tags*
/Flutter/Generated.xcconfig
/Flutter/flutter_export_environment.sh
\ No newline at end of file
//
// FlutterBaichuanPlugin+handler.h
// flutter_baichuan
//
// Created by xgz on 2020/11/23.
//
#import "BaichuanPlugin.h"
NS_ASSUME_NONNULL_BEGIN
@interface BaichuanPlugin (handler)
-(void)debug:(FlutterResult)result;
- (void)asyncInit:(FlutterMethodCall*)call result:(FlutterResult)result;
// 设置三方媒体应用版本号
- (void)setIsvVersion:(FlutterMethodCall*)call result:(FlutterResult)result;
// 打开登录
- (void)showLogin:(FlutterMethodCall*)call result:(FlutterResult)result;
// 登出
- (void)logout:(FlutterMethodCall*)call result:(FlutterResult)result;
// 是否登录
- (void)isLogin:(FlutterMethodCall*)call result:(FlutterResult)result;
// 获取淘宝用户信息
- (void)getUserInfo:(FlutterMethodCall*)call result:(FlutterResult)result;
// 打开电商套件页面
- (void)openByCode:(FlutterMethodCall*)call result:(FlutterResult)result;
// 打开普通电商页面
- (void)openByUrl:(FlutterMethodCall*)call result:(FlutterResult)result;
// 注册 媒体外跳页面路由协议
- (void)registerNavigateUrl:(FlutterMethodCall*)call result:(FlutterResult)result;
// 注册相关图片库协议
- (void)registerImage:(FlutterMethodCall*)call result:(FlutterResult)result;
@end
NS_ASSUME_NONNULL_END
//
// FlutterBaichuanPlugin+handler.m
// flutter_baichuan
//
// Created by xgz on 2020/11/23.
//
#import "BaichuanPlugin+handler.h"
#import "AlibcUtil.h"
@implementation BaichuanPlugin (handler)
-(void)debug:(FlutterResult)result{
result(@"succ");
}
- (void)asyncInit:(FlutterMethodCall*)call result:(FlutterResult)result{
[AlibcUtil.shared initAlibc:result];
}
// 设置三方媒体应用版本号
- (void)setIsvVersion:(FlutterMethodCall*)call result:(FlutterResult)result{
}
// 打开登录
- (void)showLogin:(FlutterMethodCall*)call result:(FlutterResult)result{
[AlibcUtil.shared showLogin:result];
}
- (void)logout:(FlutterMethodCall*)call result:(FlutterResult)result{
}
- (void)isLogin:(FlutterMethodCall*)call result:(FlutterResult)result{
[AlibcUtil.shared isLogin:result];
}
- (void)getUserInfo:(FlutterMethodCall*)call result:(FlutterResult)result{
}
- (void)openByCode:(FlutterMethodCall*)call result:(FlutterResult)result{
[AlibcUtil.shared openTradePageByCode:call result:result];
}
- (void)openByUrl:(FlutterMethodCall*)call result:(FlutterResult)result{
[AlibcUtil.shared openTradePageByUrl:call result:result];
}
- (void)registerNavigateUrl:(FlutterMethodCall*)call result:(FlutterResult)result{
}
- (void)registerImage:(FlutterMethodCall*)call result:(FlutterResult)result{
}
@end
#import <Flutter/Flutter.h>
@interface BaichuanPlugin : NSObject<FlutterPlugin>
@end
#import "BaichuanPlugin.h"
#import "BaichuanPlugin+handler.h"
#import <AlibcTradeUltimateSDK/AlibcTradeUltimateSDK.h>
@interface BaichuanPlugin()<FlutterStreamHandler>
@property(nonatomic,strong)FlutterMethodChannel* channel;
@end
@implementation BaichuanPlugin
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
FlutterMethodChannel* channel = [FlutterMethodChannel
methodChannelWithName:@"com.qiaomeng.flutter/baichuan"
binaryMessenger:[registrar messenger]];
BaichuanPlugin* instance = [[BaichuanPlugin alloc] init];
instance.channel = channel;
[registrar addMethodCallDelegate:instance channel:channel];
[registrar addApplicationDelegate:instance];
}
- (instancetype)init
{
self = [super init];
if (self) {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveAliMessage:) name:@"receiveAliMessage" object:nil];
}
return self;
}
- (void)receiveAliMessage:(NSNotification*)notification{
printf(@"%@",notification.object);
//registerNavigateUrl
[self.channel invokeMethod:@"registerNavigateUrl" arguments:notification.object];
}
- (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
if ([@"getPlatformVersion" isEqualToString:call.method]) {
result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]);
}else if([@"debug" isEqualToString:call.method]){
[self debug:result];
}else if([@"asyncInit" isEqualToString:call.method]){
[self asyncInit:call result:result];
}else if([@"setIsvVersion" isEqualToString:call.method]){
}else if([@"showLogin" isEqualToString:call.method]){
[self showLogin:call result:result];
}else if([@"logout" isEqualToString:call.method]){
}else if([@"isLogin" isEqualToString:call.method]){
[self isLogin:call result:result];
}else if([@"getUserInfo" isEqualToString:call.method]){
}else if([@"openByCode" isEqualToString:call.method]){
[self openByCode:call result:result];
}else if([@"openByUrl" isEqualToString:call.method]){
[self openByUrl:call result:result];
}else if([@"registerNavigateUrl" isEqualToString:call.method]){
}else if([@"registerImage" isEqualToString:call.method]){
}else {
result(FlutterMethodNotImplemented);
}
}
-(BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options{
return [[AlibcTradeUltimateSDK sharedInstance] application:application openURL:url options:options];
}
@end
//
// AlibcUtil.h
// ios
//
// Created by xgz on 2020/11/20.
//
#import <Foundation/Foundation.h>
#import <Flutter/FlutterChannels.h>
NS_ASSUME_NONNULL_BEGIN
@interface AlibcUtil : NSObject
+(instancetype)shared;
///初始化百川
- (void)initAlibc:(FlutterResult)result;
///打开电商套件
- (void)openTradePageByCode:(FlutterMethodCall*)call result:(FlutterResult)result;
///打开商品页面
- (void)openTradePageByUrl:(FlutterMethodCall*)call result:(FlutterResult)result;
///是否登录
- (void)isLogin:(FlutterResult)result;
///去登录
- (void)showLogin:(FlutterResult)result;
@end
NS_ASSUME_NONNULL_END
//
// AlibcUtil.m
// ios
//
// Created by xgz on 2020/11/20.
//
#import "AlibcUtil.h"
#import <AlibcTradeUltimateSDK/AlibcTradeUltimateSDK.h>
// 媒体电商套件图片库协议实现
#import "ALITradeDemoImageLoader.h"
#import <WindmillWeaver/WMLHandlerFactory.h>
// 电商套件外跳媒体页面实现
#import "ALiTradeDemoURLHandler.h"
#import <AlibcTradeContainer/AlibcTradeMiniAppURLRouter.h>
#import "ALITradeDemoZipArchiver.h"
//
@interface AlibcUtil()
// 图片库实现
@property (nonatomic,strong)ALITradeDemoImageLoader *imageLoaderImp;
// 外跳路由协议实现
@property (nonatomic,strong)ALiTradeDemoURLHandler *urlHandlerImp;
@end
@implementation AlibcUtil
static AlibcUtil *p = nil ;
+(instancetype)shared{
if(p == nil){
p = [[AlibcUtil alloc]init];
}
return p;
}
//初始化百川
- (void)initAlibc:(FlutterResult)result{
[[AlibcTradeUltimateSDK sharedInstance] setDebugLogOpen:YES];
__weak typeof(self) weakSelf = self;
[[AlibcTradeUltimateSDK sharedInstance] asyncInitWithSuccess:^{
NSLog(@"初始化百川成功");
result(@{@"status":@(true),@"code":@(0),@"msg":@"succ"});
__strong typeof(self) self = weakSelf;
// 注册Zip解压能力
[WMLHandlerFactory registerHandler:[ALITradeDemoZipArchiver new] withProtocol:@protocol(TRVZipArchiveProtocol)];
// 注册图片库协议
self.imageLoaderImp = [ALITradeDemoImageLoader new];
[WMLHandlerFactory registerHandler:self.imageLoaderImp withProtocol:@protocol(WMLImageLoaderProtocol)];
// 注册电商套件外跳媒体路由协议实现
self.urlHandlerImp = [ALiTradeDemoURLHandler new];
[[AlibcTradeMiniAppURLRouter sharedInstance] addMiniAppRouterListener:self.urlHandlerImp];
#ifdef DEBUG
//必须在百川初始化成功之后调用,开启自检工具的悬浮入口
[[AlibcTradeUltimateSDK sharedInstance] enableAutoShowDebug:YES];
#endif
} failure:^(NSError * _Nonnull error) {
NSLog(@"初始化百川失败");
result(@{@"status":@(error.code),@"code":@(error.code),@"msg":error.userInfo});
}];
}
///是否登录
- (void)isLogin:(FlutterResult)result{
bool isLogin = [[[AlibcTradeUltimateSDK sharedInstance] loginService] isLogin];
result(@{
@"status":@(isLogin),
@"msg": isLogin? @"已登录":@"未登录",
@"isLogin":@(isLogin)
}
);
}
///去登录
- (void)showLogin:(FlutterResult)result{
UINavigationController *nav = (UINavigationController*)[UIApplication sharedApplication].keyWindow.rootViewController;
[[[AlibcTradeUltimateSDK sharedInstance] loginService] auth:nav success:^(AlibcUser *user) {
result(@{
@"status":@true,
@"msg": @"登录成功",
@"userInfo":@{
@"userId":user.openId,@"userNick":user.nick
},
}
);
} failure:^(NSError *error) {
result(@{
@"status":@false,
@"msg": @"登录失败",
@"code":@(1),
@"userInfo":@{
@"userId":@"",@"userNick":@""
},
}
);
}];
}
///打开电商套件
- (void)openTradePageByCode:(FlutterMethodCall*)call result:(FlutterResult)result{
NSString *suiteCode = call.arguments[@"suiteCode"];
AlibcTradeUrlParams *urlParams = [self coverMapToAlibcTradeUrlParams:call.arguments[@"bizParams"]];
AlibcTradeShowParams *showParams = [self coverMapToAlibcTradeShowParams:call.arguments[@"showParams"]];
AlibcTradeTaokeParams *taokeParam = [self coverMapToAlibcTradeTaokeParams:call.arguments[@"taokeParams"]];
NSDictionary *trackParam = [call.arguments[@"trackParams"] isKindOfClass:[NSNull class]]? @{}:call.arguments[@"trackParams"];
UINavigationController *nav = (UINavigationController*)[UIApplication sharedApplication].keyWindow.rootViewController;
[[AlibcTradeUltimateSDK sharedInstance].tradeService
openTradePageByCode:suiteCode
parentController:nav
urlParams:urlParams
showParams:showParams
taoKeParams:taokeParam
trackParam:trackParam
openUrlCallBack:^(NSError *_Nonnull error) {
if (error) {
NSLog(@"调用失败");
result(@{@"status":@(error.code),@"code":@(error.code),@"msg":error.userInfo});
} else {
NSLog(@"调用成功");
result(@{@"status":@(true),@"code":@(0),@"msg":@"succ"});
}
}];
}
///打开商品页面
- (void)openTradePageByUrl:(FlutterMethodCall*)call result:(FlutterResult)result{
NSLog(@"%@",call.arguments);
NSString *detailUrl = call.arguments[@"detailUrl"];
NSDictionary *showParamsDic = call.arguments[@"showParams"];
AlibcTradeShowParams *showParams = [self coverMapToAlibcTradeShowParams:call.arguments[@"showParams"]];
AlibcTradeTaokeParams *taokeParam = [self coverMapToAlibcTradeTaokeParams:call.arguments[@"taokeParams"]];
NSDictionary *trackParams = [call.arguments[@"trackParams"] isKindOfClass:[NSNull class]]? @{}:call.arguments[@"trackParams"];
// 构造taokeParam
[[[AlibcTradeUltimateSDK sharedInstance] tradeService] openTradeUrl:detailUrl parentController:(UINavigationController*)[UIApplication sharedApplication].keyWindow.rootViewController showParams:showParams taoKeParams:taokeParam trackParam:trackParams openUrlCallBack:^(NSError *error) {
if (error) {
NSLog(@"调用成功");
} else {
NSLog(@"调用失败");
}
}];
}
- (AlibcTradeUrlParams*)coverMapToAlibcTradeUrlParams:(NSDictionary *)dic{
AlibcTradeUrlParams *params = [AlibcTradeUrlParams new];
params.id = [self getParams:@"id" dic:dic];
params.shopId = [self getParams:@"shopId" dic:dic];
params.bizExtMap = [dic[@"extParams"] isKindOfClass:[NSNull class]]? nil:dic[@"extParams"];
return params;
}
- (AlibcTradeTaokeParams*)coverMapToAlibcTradeTaokeParams:(NSDictionary *)dic{
AlibcTradeTaokeParams *params = [AlibcTradeTaokeParams new];
params.pid = [self getParams:@"pid" dic:dic];
params.subPid = [self getParams:@"subPid" dic:dic];
params.relationId = [self getParams:@"relationId" dic:dic];
params.unionId = [self getParams:@"unionId" dic:dic];
params.materialSourceUrl = [self getParams:@"materialSourceUrl" dic:dic];
params.extParams = [dic[@"extParams"] isKindOfClass:[NSNull class]]? nil:dic[@"extParams"];
return params;
}
- (AlibcTradeShowParams*)coverMapToAlibcTradeShowParams:(NSDictionary *)dic{
AlibcTradeShowParams *params = [AlibcTradeShowParams new];
params.linkKey = [self getParams:@"backUrl" dic:dic];
params.degradeUrl = [self getParams:@"degradeUrl" dic:dic];
return params;
}
- (NSString*)getParams:(NSString*)key dic:(NSDictionary*)dic{
if([dic[key] isKindOfClass:[NSNull class]]){
return @"";
}else{
return dic[key];
}
}
@end
//
// ALITradeDemoImageLoader.h
// NBUltimateDemo
//
//
#import <Foundation/Foundation.h>
#import <WindmillWeaver/WMLImageLoaderProtocol.h>
NS_ASSUME_NONNULL_BEGIN
@interface ALITradeDemoImageLoader : NSObject
@end
NS_ASSUME_NONNULL_END
//
// ALITradeDemoImageLoader.m
// NBUltimateDemo
//
//
#import "ALITradeDemoImageLoader.h"
#import <SDWebImage/SDWebImageDownloader.h>
#import <SDWebImage/UIImageView+WebCache.h>
@implementation ALITradeDemoImageLoader
- (id<WMLImageOperationProtocol>)downloadImageWithURL:(NSURL *)imageUrl
frame:(CGRect)imageFrame
options:(NSDictionary *)options
progress:(void(^)(NSInteger receivedSize, NSInteger expectedSize))progressBlock
completed:(void(^)(UIImage *image, NSError *error, BOOL finished))completedBlock {
NSInteger imageQuality = [[options objectForKey:@"imageQuality"] integerValue];
SDWebImageDownloader*imageLoader = [SDWebImageDownloader new];
id<SDWebImageOperation> obj =[imageLoader downloadImageWithURL:imageUrl options:imageQuality progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, BOOL finished) {
if (completedBlock) {
completedBlock(image, error, finished);
}
}];
return (id<WMLImageOperationProtocol>)obj;
}
- (void)setImageView:(UIImageView *)imageView
withURL:(NSURL *)imageUrl
placeholder:(UIImage *)placeholder
options:(NSDictionary *)options
progress:(void(^)(NSInteger receivedSize, NSInteger expectedSize))progressBlock
completed:(void(^)(UIImage *image, NSError *error, WMLImageLoaderCacheType cacheType, NSURL *imageURL))completedBlock {
NSInteger imageQuality = [[options objectForKey:@"imageQuality"] integerValue];
[imageView sd_setImageWithURL:imageUrl placeholderImage:placeholder options:(SDWebImageOptions)imageQuality progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
WMLImageLoaderCacheType type = WMLImageLoaderCacheTypeNone;
if (cacheType == SDImageCacheTypeMemory) {
type = WMLImageLoaderCacheTypeMemory;
} else if (cacheType == SDImageCacheTypeDisk) {
type = WMLImageLoaderCacheTypeDisk;
}
if (completedBlock) {
completedBlock(image, error, type, imageUrl);
}
}];
}
@end
//
// ALiTradeDemoURLHandler.h
// NBUltimateDemo
//
//
#import <Foundation/Foundation.h>
#import <AlibcTradeContainer/AlibcTradeMiniAppURLRouterProtocol.h>
NS_ASSUME_NONNULL_BEGIN
@interface ALiTradeDemoURLHandler : NSObject<AlibcTradeMiniAppURLRouterProtocol>
@end
NS_ASSUME_NONNULL_END
//
// ALiTradeDemoURLHandler.m
// NBUltimateDemo
//
//
#import "ALiTradeDemoURLHandler.h"
#import <AlibcTradeContainer/AlibcTradeMiniAppURLRouter.h>
@interface ALiTradeDemoURLHandler()
@end
@implementation ALiTradeDemoURLHandler
- (BOOL)openURL:(NSString *)urlStr onViewController:(UIViewController *)vc withParam:(NSDictionary *)param animated:(BOOL)animated {
[[NSNotificationCenter defaultCenter] postNotificationName:@"receiveAliMessage" object:urlStr];
return YES;
}
@end
//
// ALITradeDemoZipArchiver.h
// NBUltimateDemo
//
// Created by zhongweitao on 2020/2/18.
// Copyright © 2020 shan yi. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <WindmillWeaver/TRVZipArchiveProtocol.h>
@interface ALITradeDemoZipArchiverOp : NSObject<TRVZipOperationProtocol>
@end
@interface ALITradeDemoZipArchiver : NSObject<TRVZipArchiveProtocol>
@end
//
// ALITradeDemoZipArchiver.m
// NBUltimateDemo
//
// Created by zhongweitao on 2020/2/18.
// Copyright © 2020 shan yi. All rights reserved.
//
#import "ALITradeDemoZipArchiver.h"
//#import <ZipArchive/ZipArchive.h>
//#import <SSZipArchive/SSZipArchive.h>
#import "SSZipArchive.h"
@interface ALITradeDemoZipArchiverOp ()
@property (nonatomic, strong) SSZipArchive *innerArchiver;
@property (nonatomic, strong) NSString *zipFile;
@end
@implementation ALITradeDemoZipArchiverOp
- (BOOL)UnzipOpenFile:(NSString *)zipFile
{
// _innerArchiver = [[SSZipArchive alloc] initWithPath:zipFile];
_zipFile = zipFile;
return YES;
}
- (BOOL)UnzipCloseFile
{
return YES;//[self.innerArchiver close];
}
- (BOOL)UnzipFileTo:(NSString *)path overWrite:(BOOL)overwrite
{
return [SSZipArchive unzipFileAtPath:self.zipFile toDestination:path];
}
@end
@implementation ALITradeDemoZipArchiver
- (id<TRVZipOperationProtocol>)zipArchiverInstance
{
return [ALITradeDemoZipArchiverOp new];
}
@end
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
# Run `pod lib lint baichuan.podspec' to validate before publishing.
#
Pod::Spec.new do |s|
s.name = 'baichuan'
s.version = '0.0.1'
s.summary = '百川SDK'
s.description = <<-DESC
百川SDK
DESC
s.homepage = 'http://example.com'
s.license = { :file => '../LICENSE' }
s.author = { 'Your Company' => 'email@example.com' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter'
s.platform = :ios, '9.0'
#基础电商SDK依赖
s.dependency 'mtopSDK', '3.0.0.5'
s.dependency 'securityGuard', '5.4.191'
s.dependency 'BCUserTrack', '7.2.0.7-BC1'
s.dependency 'AliAuthSDK', '1.1.0.42-bc'
s.dependency 'AliLinkPartnerSDK', '4.0.0.24-wk'
s.dependency 'MunionBcAdSDK', '1.0.5'
#电商套件依赖
s.dependency 'WindVane', '8.5.0.46-bc11'
s.dependency 'WindMix', '1.0.0.5'
s.dependency 'Ariver', '1.0.11.2-BC1'
s.dependency 'Triver', '1.0.11.5-BC10'
s.dependency 'Triver/LivePlayer', '1.0.11.5-BC10'
s.dependency 'Windmill', '1.3.7.3-BC2'
s.dependency 'AlibcTradeUltimateSDK', '5.0.0.3-BC4'
s.dependency 'AlibcTradeUltimateSDK/MiniApp', '5.0.0.3-BC4'
s.dependency 'TBMediaPlayer', '2.0.7.37'
s.dependency 'miniAppMediaSDK', '0.0.1.45-BC2'
s.dependency 'DWInteractiveSDK', '2.0.7.53-BC'
#电商套件外部依赖 可以使用媒体版本
s.dependency 'FMDB'
s.dependency 'Reachability'
s.dependency 'Masonry'
s.dependency 'SocketRocket'
#电商套件媒体图片库实现外部依赖(媒体自由注入实现 这里只是举例)
s.dependency 'SSZipArchive'
s.dependency 'SDWebImage'
s.static_framework = true
s.libraries = "resolv"
# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
end
library baichuan;
export 'package:baichuan/src/handler.dart';
export 'package:baichuan/src/model.dart';
export 'package:baichuan/src/params.dart';
\ No newline at end of file
import 'package:baichuan/src/model.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/services.dart';
import 'package:baichuan/src/params.dart';
import 'dart:io' show Platform;
class BCHandler {
static const MethodChannel _channel =
const MethodChannel('com.qiaomeng.flutter/baichuan');
static const EventChannel _eventChannel =
const EventChannel('com.qiaomeng.flutter/baichuan_event');
static Function(String url) _registerNavigateUrl;
// 开启debug
static void debug() {
_channel.invokeMethod('debug');
}
//监听消息
static eventChannelAddListener(Function listener) {
_eventChannel.receiveBroadcastStream().listen(listener);
}
// 初始化
static Future<InitResultModel> asyncInit() async {
var map = await _channel.invokeMethod('asyncInit');
var status = map['status'];
if (Platform.isIOS) {
status = map['status'] == 1;
}
InitResultModel res = InitResultModel(status, map['code'], map['msg']);
_channel.setMethodCallHandler((call) async {
if (call.method == 'registerNavigateUrl') {
if (_registerNavigateUrl != null) {
_registerNavigateUrl(call.arguments);
}
}
});
return res;
}
// 设置三方媒体应用版本号
static void setIsvVersion(String v) {
_channel.invokeMethod('setIsvVersion', v);
}
// 打开登录
static Future<LoginResultModel> showLogin() async {
var map = await _channel.invokeMethod('showLogin');
var status = map['status'];
if (Platform.isIOS) {
status = map['status'] == 1;
}
var userMap = map['userInfo'];
UserInfoResultModel info =
UserInfoResultModel(userMap['userId'], userMap['userNick']);
LoginResultModel res =
LoginResultModel(status, map['code'], map['msg'], info);
return res;
}
// 登出
static Future<LoginResultModel> logout() async {
var map = await _channel.invokeMethod('logout');
var userMap = map['userInfo'];
UserInfoResultModel info =
UserInfoResultModel(userMap['userId'], userMap['userNick']);
LoginResultModel res =
LoginResultModel(map['status'], map['code'], map['msg'], info);
return res;
}
// 是否登录
static Future<IsLoginResultModel> isLogin() async {
var map = await _channel.invokeMethod('isLogin');
IsLoginResultModel res =
IsLoginResultModel(map['status'], map['msg'], map['isLogin']);
return res;
}
// 获取淘宝用户信息
static Future<GetUserInfoResultModel> getUserInfo() async {
var map = await _channel.invokeMethod('getUserInfo');
var userMap = map['userInfo'];
UserInfoResultModel info =
UserInfoResultModel(userMap['userId'], userMap['userNick']);
GetUserInfoResultModel res =
GetUserInfoResultModel(map['status'], map['code'], map['msg'], info);
return res;
}
// 打开电商套件页面
static Future<OpenResultModel> openByCode(
{@required String suiteCode,
AlibcBizParams biz,
AlibcTaokeParams taoke,
AlibcShowParams show,
Map trackParams}) async {
var map = await _channel.invokeMethod('openByCode', {
"suiteCode": suiteCode,
"bizParams": biz != null ? biz.toMap() : {},
"showParams": show != null ? show.toMap() : {},
"taokeParams": taoke != null ? taoke.toMap() : {},
"trackParams": trackParams
});
bool status;
if (Platform.isIOS) {
status = map['status'] == 1;
} else {
status = map['status'];
}
OpenResultModel m = OpenResultModel(status, map['code'], map['msg']);
return m;
}
// 打开普通电商页面
static Future<OpenResultModel> openByUrl(
{@required String detailUrl,
AlibcTaokeParams taoke,
AlibcShowParams show,
Map trackParams}) async {
var map = await _channel.invokeMethod('openByUrl', {
"detailUrl": detailUrl,
"showParams": show == null ? {} : show.toMap(),
"taokeParams": taoke == null ? {} : taoke.toMap(),
"trackParams": trackParams ?? {}
});
bool status;
if (Platform.isIOS) {
status = map['status'] == 1;
} else {
status = map['status'];
}
OpenResultModel res = OpenResultModel(status, map['code'], map['msg']);
return res;
}
// 注册 媒体外跳页面路由协议
static void registerNavigateUrl(Function(String url) cb) {
_channel.invokeMethod('registerNavigateUrl');
_registerNavigateUrl = cb;
}
// 注册相关图片库协议
static void registerImage() {
_channel.invokeMethod('registerImage');
}
}
class InitResultModel {
final bool status;
final int code;
final String msg;
InitResultModel(this.status, this.code, this.msg);
Map toMap() {
return {"status": status, "code": code, "msg": msg};
}
}
class LoginResultModel {
final bool status;
final int code;
final String msg;
final UserInfoResultModel userInfo;
LoginResultModel(this.status, this.code, this.msg, this.userInfo);
Map toMap() {
return {"status": status, "code": code, "msg": msg, "userInfo": userInfo};
}
}
class UserInfoResultModel {
final String userId;
final String userNick;
UserInfoResultModel(this.userId, this.userNick);
Map toMap() {
return {"userId": userId, "userNick": userNick};
}
}
class OpenResultModel {
final bool status;
final int code;
final String msg;
OpenResultModel(this.status, this.code, this.msg);
Map toMap() {
return {"status": status, "code": code, "msg": msg};
}
}
class IsLoginResultModel {
final bool status;
final String msg;
final bool isLogin;
IsLoginResultModel(this.status, this.msg, this.isLogin);
Map toMap() {
return {"status": status, "isLogin": isLogin, "msg": msg};
}
}
class GetUserInfoResultModel {
final bool status;
final int code;
final String msg;
final UserInfoResultModel userInfo;
GetUserInfoResultModel(this.status, this.code, this.msg, this.userInfo);
Map toMap() {
return {"status": status, "code": code, "msg": msg, "userInfo": userInfo};
}
}
enum _AlibcBizPageType { guide, agent, rebate }
class AlibcBizExtParams {
String couponActivityId;
String vegasCode;
_AlibcBizPageType pageType = _AlibcBizPageType.agent;
String flRate;
String dlRate;
String maxDlRate;
String isvUserId;
static const _AlibcBizPageType PAGE_TYPE_GUIDE = _AlibcBizPageType.guide;
static const _AlibcBizPageType PAGE_TYPE_AGENT = _AlibcBizPageType.agent;
static const _AlibcBizPageType PAGE_TYPE_REBATE = _AlibcBizPageType.rebate;
static AlibcBizExtParams newBuilder() {
return new AlibcBizExtParams();
}
AlibcBizExtParams();
AlibcBizExtParams setCouponActivityId(String couponActivityId) {
this.couponActivityId = couponActivityId;
return this;
}
AlibcBizExtParams setVegasCode(String vegasCode) {
this.vegasCode = vegasCode;
return this;
}
AlibcBizExtParams setPageType(_AlibcBizPageType pageType) {
this.pageType = pageType;
return this;
}
AlibcBizExtParams setFlRate(String flRate) {
this.flRate = flRate;
return this;
}
AlibcBizExtParams setDlRate(String dlRate) {
this.dlRate = dlRate;
return this;
}
AlibcBizExtParams setMaxDlRate(String maxDlRate) {
this.maxDlRate = maxDlRate;
return this;
}
AlibcBizExtParams setIsvUserId(String isvUserId) {
this.isvUserId = isvUserId;
return this;
}
Map toMap() {
return {
'couponActivityId': couponActivityId ?? '',
'vegasCode': vegasCode ?? '',
'pageType': ['guide', 'agent', 'rebate'][pageType.index],
'flRate': flRate ?? '',
'dlRate': dlRate ?? '',
'maxDlRate': maxDlRate ?? '',
'isvUserId': isvUserId ?? '',
};
}
AlibcBizExtParams.from(Map map) {
var pageTypes = {
'guide': _AlibcBizPageType.guide,
'agent': _AlibcBizPageType.agent,
'rebate': _AlibcBizPageType.rebate
};
this.couponActivityId = map['couponActivityId'];
this.vegasCode = map['vegasCode'];
this.pageType = pageTypes[map['pageType']];
this.flRate = map['flRate'];
this.dlRate = map['dlRate'];
this.maxDlRate = map['maxDlRate'];
this.isvUserId = map['isvUserId'];
}
}
class AlibcBizParams {
String id;
String shopId;
String sellerId;
AlibcBizExtParams extParams;
static AlibcBizParams newBuilder() {
return new AlibcBizParams();
}
AlibcBizParams();
AlibcBizParams setId(String id) {
this.id = id;
return this;
}
AlibcBizParams setShopId(String shopId) {
this.shopId = shopId;
return this;
}
AlibcBizParams setSellerId(String sellerId) {
this.sellerId = sellerId;
return this;
}
AlibcBizParams setExtParams(AlibcBizExtParams extParams) {
this.extParams = extParams;
return this;
}
Map toMap() {
return {
'id': id,
'shopId': shopId,
'sellerId': sellerId,
'extParams': extParams != null ? extParams.toMap() : {}
};
}
AlibcBizParams.from(Map map) {
this.id = map['id'];
this.shopId = map['shopId'];
this.sellerId = map['sellerId'];
this.extParams = AlibcBizExtParams.from(map['extParams']);
}
}
class AlibcTaokeParams {
String pid;
String subPid;
String unionId;
String relationId;
String materialSourceUrl;
Map<String, dynamic> extParams;
static AlibcTaokeParams newBuilder() {
return new AlibcTaokeParams();
}
AlibcTaokeParams();
AlibcTaokeParams setPid(String pid) {
this.pid = pid;
return this;
}
AlibcTaokeParams setSubPid(String subPid) {
this.subPid = subPid;
return this;
}
AlibcTaokeParams setUnionId(String unionId) {
this.unionId = unionId;
return this;
}
AlibcTaokeParams setRelationId(String relationId) {
this.relationId = relationId;
return this;
}
AlibcTaokeParams setMaterialSourceUrl(String materialSourceUrl) {
this.materialSourceUrl = materialSourceUrl;
return this;
}
AlibcTaokeParams setExtParams(Map<String, dynamic> extParams) {
this.extParams = extParams;
return this;
}
Map toMap() {
return {
'pid': pid,
'subPid': subPid,
'unionId': unionId,
'relationId': relationId,
'materialSourceUrl': materialSourceUrl,
'extParams': extParams,
};
}
AlibcTaokeParams.from(Map map) {
this.pid = map['pid'];
this.subPid = map['subPid'];
this.unionId = map['unionId'];
this.relationId = map['relationId'];
this.materialSourceUrl = map['materialSourceUrl'];
this.extParams = map['extParams'];
}
}
enum _AlibcShowDegradeType { h5, download }
enum _AlibcShowOpenType { auto, native }
enum _AlibcShowClientType { taobao, tmall }
class AlibcShowParams {
String title;
String backUrl;
String degradeUrl;
_AlibcShowDegradeType degradeType = _AlibcShowDegradeType.h5;
_AlibcShowOpenType openType = _AlibcShowOpenType.auto;
_AlibcShowClientType clientType = _AlibcShowClientType.taobao;
static const _AlibcShowDegradeType DEGRADE_TYPE_H5 = _AlibcShowDegradeType.h5;
static const _AlibcShowDegradeType DEGRADE_TYPE_DOWNLOAD =
_AlibcShowDegradeType.download;
static const _AlibcShowOpenType OPEN_TYPE_AUTO = _AlibcShowOpenType.auto;
static const _AlibcShowOpenType OPEN_TYPE_NATIVE = _AlibcShowOpenType.native;
static const _AlibcShowClientType CLIENT_TYPE_TAOBAO =
_AlibcShowClientType.taobao;
static const _AlibcShowClientType CLIENT_TYPE_TMALL =
_AlibcShowClientType.tmall;
static AlibcShowParams newBuilder() {
return new AlibcShowParams();
}
AlibcShowParams();
AlibcShowParams setBackUrl(String backUrl) {
this.backUrl = backUrl;
return this;
}
AlibcShowParams setDegradeUrl(String degradeUrl) {
this.degradeUrl = degradeUrl;
return this;
}
AlibcShowParams setDegradeType(_AlibcShowDegradeType degradeType) {
this.degradeType = degradeType;
return this;
}
AlibcShowParams setOpenType(_AlibcShowOpenType openType) {
this.openType = openType;
return this;
}
AlibcShowParams setTitle(String title) {
this.title = title;
return this;
}
AlibcShowParams setClientType(_AlibcShowClientType clientType) {
this.clientType = clientType;
return this;
}
Map toMap() {
return {
'backUrl': backUrl,
'degradeUrl': degradeUrl,
'degradeType': degradeType.index,
'openType': openType.index,
'title': title,
'clientType': clientType.index,
};
}
AlibcShowParams.from(Map map) {
var degradeTypes = {
"h5": _AlibcShowDegradeType.h5,
"download": _AlibcShowDegradeType.download
};
var openTypes = {
"auto": _AlibcShowOpenType.auto,
"native": _AlibcShowOpenType.native
};
var clientTypes = {
"taobao": _AlibcShowClientType.taobao,
"tmall": _AlibcShowClientType.tmall
};
this.backUrl = map['backUrl'];
this.degradeUrl = map['degradeUrl'];
this.degradeType = degradeTypes[map['degradeType']];
this.openType = openTypes[map['openType']];
this.title = map['title'];
this.clientType = clientTypes[map['clientType']];
}
}
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
archive:
dependency: transitive
description:
name: archive
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.13"
args:
dependency: transitive
description:
name: args
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.6.0"
async:
dependency: transitive
description:
name: async
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.4.1"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.3"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.14.12"
convert:
dependency: transitive
description:
name: convert
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.1"
crypto:
dependency: transitive
description:
name: crypto
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.4"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
image:
dependency: transitive
description:
name: image
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.12"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.12.6"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.8"
path:
dependency: transitive
description:
name: path
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.6.4"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.4.0"
quiver:
dependency: transitive
description:
name: quiver
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.3"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
source_span:
dependency: transitive
description:
name: source_span
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.7.0"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.9.3"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.5"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.2.15"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.6"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.8"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.6.1"
sdks:
dart: ">=2.7.0 <3.0.0"
flutter: ">=1.10.0"
name: baichuan
description: 百川SDK
version: 0.0.1
author:
homepage:
environment:
sdk: ">=2.7.0 <3.0.0"
flutter: ">=1.10.0"
dependencies:
flutter:
sdk: flutter
dev_dependencies:
flutter_test:
sdk: flutter
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
# This section identifies this Flutter project as a plugin project.
# The 'pluginClass' and Android 'package' identifiers should not ordinarily
# be modified. They are used by the tooling to maintain consistency when
# adding or updating assets for this project.
plugin:
platforms:
android:
package: com.qiaomeng.flutter.baichuan
pluginClass: BaichuanPlugin
ios:
pluginClass: BaichuanPlugin
# To add assets to your plugin package, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
#
# For details regarding assets in packages, see
# https://flutter.dev/assets-and-images/#from-packages
#
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.
# To add custom fonts to your plugin package, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts in packages, see
# https://flutter.dev/custom-fonts/#from-packages
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
const MethodChannel channel = MethodChannel('baichuan');
TestWidgetsFlutterBinding.ensureInitialized();
setUp(() {
channel.setMockMethodCallHandler((MethodCall methodCall) async {
return '42';
});
});
tearDown(() {
channel.setMockMethodCallHandler(null);
});
test('getPlatformVersion', () async {
// expect(await Baichuan.platformVersion, '42');
});
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment