浏览代码

0409 升级android端百川sdk,新增授权方法

tags/0.0.7
23028876916@qq.com 3 年前
父节点
当前提交
f83ba0a4d4
共有 23 个文件被更改,包括 436 次插入319 次删除
  1. +54
    -22
      android/build.gradle
  2. +1
    -0
      android/gradle.properties
  3. +177
    -71
      android/src/main/java/com/wxwx/flutter_alibc/FlutterAlibcHandle.java
  4. +2
    -0
      android/src/main/java/com/wxwx/flutter_alibc/FlutterAlibcPlugin.java
  5. +25
    -24
      android/src/main/java/com/wxwx/flutter_alibc/PluginUtil.java
  6. +33
    -17
      android/src/main/java/com/wxwx/flutter_alibc/WebActivity.java
  7. +19
    -15
      android/src/main/java/com/wxwx/flutter_alibc/web/WebViewActivity.java
  8. 二进制
     
  9. 二进制
     
  10. 二进制
     
  11. 二进制
     
  12. 二进制
     
  13. +1
    -1
      example/.flutter-plugins-dependencies
  14. +3
    -1
      example/android/app/build.gradle
  15. +1
    -1
      example/android/app/src/main/AndroidManifest.xml
  16. +4
    -1
      example/android/build.gradle
  17. +3
    -1
      example/android/gradle.properties
  18. +2
    -2
      example/android/gradle/wrapper/gradle-wrapper.properties
  19. +10
    -5
      example/ios/Flutter/flutter_export_environment.sh
  20. +20
    -10
      example/lib/main.dart
  21. +33
    -75
      example/pubspec.lock
  22. +17
    -0
      lib/flutter_alibc.dart
  23. +31
    -73
      pubspec.lock

+ 54
- 22
android/build.gradle 查看文件

@@ -9,7 +9,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.android.tools.build:gradle:3.3.2'
}
}

@@ -32,7 +32,8 @@ android {
defaultConfig {
buildConfigField "boolean", "LOG_DEBUG", "true"
minSdkVersion 16
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
lintOptions {
disable 'InvalidPackage'
@@ -45,26 +46,57 @@ android {

dependencies{

//登陆
implementation 'com.ali.auth.sdk:alibabauth_core:2.0.0.11@aar'
implementation 'com.ali.auth.sdk:alibabauth_ui:2.0.0.11@aar'
implementation 'com.ali.auth.sdk:alibabauth_ext:2.0.0.11@aar'
//安全组件
implementation 'com.taobao.android:securityguardaar3:5.4.171@aar'
implementation 'com.taobao.android:securitybodyaar3:5.4.99@aar'
implementation 'com.taobao.android:avmpaar3:5.4.36@aar'
implementation 'com.taobao.android:sgmiddletieraar3:5.4.9@aar'
//Mtop
implementation 'com.taobao.android:mtopsdk_allinone_open:3.1.2.5@jar'
//applink
implementation 'com.alibaba.sdk.android:alibc_link_partner:4.1.15@aar'
//ut
implementation 'com.taobao.android:utdid4all:1.5.2'
implementation 'com.alibaba.mtl:app-monitor-sdk:2.6.4.5_for_bc'
////登陆
// implementation 'com.ali.auth.sdk:alibabauth_core:2.0.0.11@aar'
// implementation 'com.ali.auth.sdk:alibabauth_ui:2.0.0.11@aar'
// implementation 'com.ali.auth.sdk:alibabauth_ext:2.0.0.11@aar'
// //安全组件
// implementation 'com.taobao.android:securityguardaar3:5.4.171@aar'
// implementation 'com.taobao.android:securitybodyaar3:5.4.99@aar'
// implementation 'com.taobao.android:avmpaar3:5.4.36@aar'
// implementation 'com.taobao.android:sgmiddletieraar3:5.4.9@aar'
// //Mtop
// implementation 'com.taobao.android:mtopsdk_allinone_open:3.1.2.5@jar'
// //applink
// implementation 'com.alibaba.sdk.android:alibc_link_partner:4.1.15@aar'
// //ut
// implementation 'com.taobao.android:utdid4all:1.5.2'
// implementation 'com.alibaba.mtl:app-monitor-sdk:2.6.4.5_for_bc'
// // 电商基础组件
// implementation 'com.alibaba.sdk.android:AlibcTradeCommon:4.0.0.16@aar'
// implementation 'com.alibaba.sdk.android:AlibcTradeBiz:4.0.0.16@aar'
// implementation 'com.alibaba.sdk.android:nb_trade:4.0.0.16@aar'
// implementation 'com.alibaba:fastjson:1.2.52@jar'

implementation 'com.android.support:multidex:1.0.3'
implementation 'androidx.appcompat:appcompat:1.3.0-alpha02'
implementation 'androidx.cardview:cardview:1.0.0'
// 登陆
implementation 'com.alibaba.baichuan.sdk:alibclogin:5.0.0.13'
// applink
implementation 'com.alibaba.baichuan.sdk:alibcapplink:5.0.0.13'
// 广告SDK
implementation 'com.alibaba.baichuan.sdk:alibcad:5.0.0.13'
// 小程序
implementation 'com.alibaba.baichuan.sdk:alibctriver:5.0.0.13'
// c++基础库(如果工程中没有接入该so包:libc++_shared.so,需要接入该sdk)
implementation "llvm.stl:cpp_shared:0.0.3@aar"
// 直播
implementation 'com.alibaba.baichuan.sdk:alibctriver_live:5.0.0.13'
// webview容器
implementation 'com.alibaba.baichuan.sdk:alibcwebview:5.0.0.13'
// 电商基础组件
implementation 'com.alibaba.sdk.android:AlibcTradeCommon:4.0.0.16@aar'
implementation 'com.alibaba.sdk.android:AlibcTradeBiz:4.0.0.16@aar'
implementation 'com.alibaba.sdk.android:nb_trade:4.0.0.16@aar'
implementation 'com.alibaba:fastjson:1.2.52@jar'
implementation 'com.alibaba.baichuan.sdk:alibctradecommon:5.0.0.13'
implementation 'com.alibaba.baichuan.sdk:alibcnbtrade:5.0.0.13'
implementation 'com.alibaba.baichuan.sdk:alibcprotocol:5.0.0.13'
// 辅助排查工具(可选)
implementation "com.alibaba.baichuan.sdk:alibctools:5.0.0.13"
// 安全保镖v5版本(根据实际情况,v5和v6版本选择其一)
implementation 'com.taobao.android:securityguardaar3:5.0.0.9-v5@aar'
implementation 'com.taobao.android:securitybodyaar3:5.0.0.9-v5@aar'
implementation 'com.taobao.android:avmpaar3:5.0.0.9-v5@aar'
implementation 'com.taobao.android:sgmiddletieraar3:5.0.0.9-v5@aar'

implementation 'com.alibaba:fastjson:1.1.71.android'

}

+ 1
- 0
android/gradle.properties 查看文件

@@ -1,2 +1,3 @@
org.gradle.jvmargs=-Xmx1536M

#android.enableR8=true

+ 177
- 71
android/src/main/java/com/wxwx/flutter_alibc/FlutterAlibcHandle.java 查看文件

@@ -1,5 +1,6 @@
package com.wxwx.flutter_alibc;

import android.text.TextUtils;
import android.util.Log;
import android.webkit.WebChromeClient;
import android.webkit.WebViewClient;
@@ -7,23 +8,7 @@ import android.widget.Toast;
import android.content.Intent;

import com.ali.auth.third.core.model.Session;
import com.alibaba.baichuan.trade.biz.context.AlibcResultType;
import com.alibaba.baichuan.android.trade.AlibcTrade;
import com.alibaba.baichuan.android.trade.callback.AlibcTradeCallback;
import com.alibaba.baichuan.android.trade.model.AlibcShowParams;
import com.alibaba.baichuan.android.trade.model.OpenType;
import com.alibaba.baichuan.android.trade.page.AlibcBasePage;
import com.alibaba.baichuan.android.trade.page.AlibcDetailPage;
import com.alibaba.baichuan.android.trade.page.AlibcMyCartsPage;
import com.alibaba.baichuan.android.trade.page.AlibcShopPage;
import com.alibaba.baichuan.trade.biz.applink.adapter.AlibcFailModeType;
import com.alibaba.baichuan.trade.biz.context.AlibcTradeResult;
import com.alibaba.baichuan.trade.biz.core.taoke.AlibcTaokeParams;
import com.alibaba.baichuan.trade.biz.login.AlibcLogin;
import com.alibaba.baichuan.trade.biz.login.AlibcLoginCallback;
import com.alibaba.baichuan.android.trade.AlibcTradeSDK;
import com.alibaba.baichuan.android.trade.callback.AlibcTradeInitCallback;
import com.alibaba.baichuan.trade.common.utils.AlibcLogger;


import io.flutter.plugin.common.PluginRegistry;
import io.flutter.plugin.common.PluginRegistry.Registrar;
@@ -37,6 +22,19 @@ import android.app.AlertDialog;
import static com.wxwx.flutter_alibc.PluginConstants.*;
import static com.wxwx.flutter_alibc.PluginUtil.*;

import com.ali.auth.third.login.LoginServiceImpl;
import com.alibaba.alibclogin.AlibcLogin;
import com.alibaba.alibcprotocol.callback.AlibcLoginCallback;
import com.alibaba.alibcprotocol.callback.AlibcTradeCallback;
import com.alibaba.alibcprotocol.param.AlibcBizParams;
import com.alibaba.alibcprotocol.param.AlibcShowParams;
import com.alibaba.alibcprotocol.param.AlibcTaokeParams;
import com.alibaba.alibcprotocol.route.proxy.IAlibcLoginProxy;
import com.baichuan.nb_trade.AlibcTrade;
import com.baichuan.nb_trade.auth.TopAuth;
import com.baichuan.nb_trade.callback.AlibcTradeInitCallback;
import com.baichuan.nb_trade.callback.AuthCallback;
import com.baichuan.nb_trade.core.AlibcTradeSDK;
import com.wxwx.flutter_alibc.web.WebViewActivity;

import java.util.Map;
@@ -51,7 +49,7 @@ public class FlutterAlibcHandle {
private static FlutterAlibcHandle handle;
private static Registrar register;
private static boolean isFirst = true;
private static Result result;
private static Result result;

//第一次调用getInstance register不能为空
public static FlutterAlibcHandle getInstance(Registrar register) {
@@ -70,7 +68,7 @@ public class FlutterAlibcHandle {
* @param result
*/
public void initAlibc(MethodCall call, Result result) {
AlibcTradeSDK.asyncInit(register.activity().getApplication(), new AlibcTradeInitCallback() {
AlibcTradeSDK.asyncInit(register.activity().getApplication(), new HashMap<>(), new AlibcTradeInitCallback() {
@Override
public void onSuccess() {
result.success(PluginResponse.success(null).toMap());
@@ -89,9 +87,10 @@ public class FlutterAlibcHandle {
* @param result
*/
public void loginTaoBao(Result result) {
final AlibcLogin alibcLogin = AlibcLogin.getInstance();
final IAlibcLoginProxy alibcLogin = AlibcLogin.getInstance();
if (alibcLogin.isLogin()) {
Session session = AlibcLogin.getInstance().getSession();
// Session session = AlibcLogin.getInstance().getSession();
Session session = new LoginServiceImpl().getSession();
Map<String, Object> userInfo = new HashMap<>();
userInfo.put("nick", session.nick);
userInfo.put("avatarUrl", session.avatarUrl);
@@ -103,10 +102,24 @@ public class FlutterAlibcHandle {
return;
}
alibcLogin.showLogin(new AlibcLoginCallback() {
// @Override
// public void onSuccess(int loginResult, String openId, String userNick) {
// Map<String, Object> userInfo = new HashMap<>();
// Session session = AlibcLogin.getInstance().getSession();
// userInfo.put("nick", session.nick);
// userInfo.put("avatarUrl", session.avatarUrl);
// userInfo.put("openId", session.openId);
// userInfo.put("openSid", session.openSid);
// userInfo.put("topAccessToken", session.topAccessToken);
// userInfo.put("topAuthCode", session.topAuthCode);
// result.success(PluginResponse.success(userInfo).toMap());
// }

@Override
public void onSuccess(int loginResult, String openId, String userNick) {
public void onSuccess(String s, String s1) {
Map<String, Object> userInfo = new HashMap<>();
Session session = AlibcLogin.getInstance().getSession();
// Session session = AlibcLogin.getInstance().getSession();
Session session = new LoginServiceImpl().getSession();
userInfo.put("nick", session.nick);
userInfo.put("avatarUrl", session.avatarUrl);
userInfo.put("openId", session.openId);
@@ -130,10 +143,15 @@ public class FlutterAlibcHandle {
* @param result
*/
public void loginOut(Result result) {
AlibcLogin alibcLogin = AlibcLogin.getInstance();
IAlibcLoginProxy alibcLogin = AlibcLogin.getInstance();
alibcLogin.logout(new AlibcLoginCallback() {
// @Override
// public void onSuccess(int loginResult, String openId, String userNick) {
// }

@Override
public void onSuccess(int loginResult, String openId, String userNick) {
public void onSuccess(String s, String s1) {

}

@Override
@@ -172,6 +190,67 @@ public class FlutterAlibcHandle {
intent.putExtra("url", url);
intent.putExtra("arguments", map);
register.activity().startActivity(intent);
}

/**
* 淘宝授权登陆 获取access_token
*
* @param call
* @param result
*/
public void taoKeLoginNew(MethodCall call, Result result) {
// String icon = call.argument("icon");
String name = call.argument("name");
String alibcAppKey = call.argument("alibcAppKey");
if (!AlibcLogin.getInstance().isLogin()) {
AlibcLogin.getInstance().showLogin(new AlibcLoginCallback() {
@Override
public void onSuccess(String s, String s1) {
TopAuth.showAuthDialog(register.activity(), R.mipmap.ic_launcher, name, alibcAppKey, new AuthCallback() {
@Override
public void onSuccess(String accessToken, String expireTime) {
Map<String, String> resMap = new HashMap();
resMap.put("accessToken", accessToken);
resMap.put("expireTime", expireTime);
result.success(resMap);
}

@Override
public void onError(String code, String msg) {
Map<String, String> resMap = new HashMap();
resMap.put("accessToken", "");
resMap.put("code", code);
resMap.put("msg", msg);
result.success(resMap);
}
});
}

@Override
public void onFailure(int i, String s) {
Log.d("阿里百川授权失败", s);
}
});
} else {
TopAuth.showAuthDialog(register.activity(), R.mipmap.ic_launcher, name, alibcAppKey, new AuthCallback() {
@Override
public void onSuccess(String accessToken, String expireTime) {
Map<String, String> resMap = new HashMap();
resMap.put("accessToken", accessToken);
resMap.put("expireTime", expireTime);
result.success(resMap);
}

@Override
public void onError(String code, String msg) {
Map<String, String> resMap = new HashMap();
resMap.put("accessToken", "");
resMap.put("code", code);
resMap.put("msg", msg);
result.success(resMap);
}
});
}

}

@@ -184,14 +263,14 @@ public class FlutterAlibcHandle {
public void openByUrl(MethodCall call, Result result) {
AlibcShowParams showParams = new AlibcShowParams();
AlibcTaokeParams taokeParams = new AlibcTaokeParams("", "", "");
FlutterAlibcHandle.result=result;
FlutterAlibcHandle.result = result;
showParams.setBackUrl(call.argument(key_BackUrl));

///渠道授权
if ((Boolean) call.argument(login_And_Auth)) {
///先APP授权
if(isFirst){
isFirst=false;
if (isFirst) {
isFirst = false;
register.addActivityResultListener(new PluginRegistry.ActivityResultListener() {
@Override
public boolean onActivityResult(int requestCode, int resultCode, Intent data) {
@@ -217,13 +296,22 @@ public class FlutterAlibcHandle {
if (!AlibcLogin.getInstance().isLogin()) {

AlibcLogin.getInstance().showLogin(new AlibcLoginCallback() {
@Override
public void onSuccess(int i, String s, String s1) {
Log.d("阿里百川打开WebView", "webview");
Intent intent = new Intent(register.context(), WebActivity.class);
intent.putExtra("url", (String) call.argument("url"));
register.activity().startActivityForResult(intent, 1111);
// @Override
// public void onSuccess(int i, String s, String s1) {
// Log.d("阿里百川打开WebView", "webview");
// Intent intent = new Intent(register.context(), WebActivity.class);
// intent.putExtra("url", (String) call.argument("url"));
// register.activity().startActivityForResult(intent, 1111);
//
// }

@Override
public void onSuccess(String s, String s1) {
// Log.d("阿里百川打开WebView", "webview");
// Intent intent = new Intent(register.context(), WebActivity.class);
// intent.putExtra("url", (String) call.argument("url"));
// register.activity().startActivityForResult(intent, 1111);
taoKeLoginNew(call, result);
}

@Override
@@ -233,9 +321,10 @@ public class FlutterAlibcHandle {
});
} else {
Log.d("阿里百川打开WebView", "webview");
Intent intent = new Intent(register.context(), WebActivity.class);
intent.putExtra("url", (String) call.argument("url"));
register.activity().startActivityForResult(intent, 1111);
// Intent intent = new Intent(register.context(), WebActivity.class);
// intent.putExtra("url", (String) call.argument("url"));
// register.activity().startActivityForResult(intent, 1111);
taoKeLoginNew(call, result);
}
///后渠道信息
return;
@@ -261,19 +350,24 @@ public class FlutterAlibcHandle {
Map<String, String> trackParams = new HashMap<>();
String url = call.argument("url");
// 以显示传入url的方式打开页面(第二个参数是套件名称)
AlibcTrade.openByUrl(register.activity(), "", url, null,
new WebViewClient(), new WebChromeClient(), showParams,
AlibcTrade.openByUrl(register.activity(), url, showParams,
taokeParams, trackParams, new AlibcTradeCallback() {
// @Override
// public void onTradeSuccess(AlibcTradeResult tradeResult) {
// Map<String, Object> results = new HashMap<>();
// if (AlibcResultType.TYPECART == tradeResult.resultType) {
// results.put("type", 1);
// } else if (AlibcResultType.TYPEPAY == tradeResult.resultType) {
// results.put("type", 0);
// results.put("payFailedOrders", tradeResult.payResult.payFailedOrders);
// results.put("paySuccessOrders", tradeResult.payResult.paySuccessOrders);
// }
// result.success(PluginResponse.success(results).toMap());
// }

@Override
public void onTradeSuccess(AlibcTradeResult tradeResult) {
public void onSuccess(int i) {
Map<String, Object> results = new HashMap<>();
if (AlibcResultType.TYPECART == tradeResult.resultType) {
results.put("type", 1);
} else if (AlibcResultType.TYPEPAY == tradeResult.resultType) {
results.put("type", 0);
results.put("payFailedOrders", tradeResult.payResult.payFailedOrders);
results.put("paySuccessOrders", tradeResult.payResult.paySuccessOrders);
}
result.success(PluginResponse.success(results).toMap());
}

@@ -293,8 +387,8 @@ public class FlutterAlibcHandle {
* @param result
*/
public void openShop(MethodCall call, Result result) {
AlibcBasePage page = new AlibcShopPage(call.argument("shopId"));
openByBizCode(page, "shop", call, result);
// AlibcBasePage page = new AlibcShopPage(call.argument("shopId"));
// openByBizCode(page, "shop", call, result);
}

/**
@@ -303,8 +397,8 @@ public class FlutterAlibcHandle {
* @param result
*/
public void openCart(MethodCall call, Result result) {
AlibcBasePage page = new AlibcMyCartsPage();
openByBizCode(page, "cart", call, result);
// AlibcBasePage page = new AlibcMyCartsPage();
// openByBizCode(page, "cart", call, result);
}

/**
@@ -314,11 +408,11 @@ public class FlutterAlibcHandle {
* @param result
*/
public void openItemDetail(MethodCall call, Result result) {
AlibcBasePage page = new AlibcDetailPage(call.argument("itemID"));
openByBizCode(page, "detail", call, result);
// AlibcBasePage page = new AlibcDetailPage(call.argument("itemID"));
openByBizCode(call.argument("itemID"), "detail", call, result);
}

private void openByBizCode(AlibcBasePage page, String type, MethodCall call, Result result) {
private void openByBizCode(String page, String type, MethodCall call, Result result) {
AlibcShowParams showParams = new AlibcShowParams();
AlibcTaokeParams taokeParams = new AlibcTaokeParams("", "", "");

@@ -334,26 +428,38 @@ public class FlutterAlibcHandle {
taokeParams = getTaokeParams(call.argument("taokeParams"));
}

if ("false".equals(call.argument("isNeedCustomNativeFailMode"))) {
showParams.setNativeOpenFailedMode(AlibcFailModeType.AlibcNativeFailModeNONE);
} else if (call.argument(key_NativeFailMode) != null) {
showParams.setNativeOpenFailedMode(getFailModeType("" + call.argument(key_NativeFailMode)));
}
// if ("false".equals(call.argument("isNeedCustomNativeFailMode"))) {
// showParams.setNativeOpenFailedMode(AlibcFailModeType.AlibcNativeFailModeNONE);
// } else if (call.argument(key_NativeFailMode) != null) {
// showParams.n(getFailModeType("" + call.argument(key_NativeFailMode)));
// }

Map<String, String> trackParams = new HashMap<>();
AlibcTrade.openByBizCode(register.activity(), page, null, new WebViewClient(),
new WebChromeClient(), type, showParams, taokeParams,
AlibcTrade.openByCode(register.activity(), page, new AlibcBizParams(), showParams, taokeParams,
trackParams, new AlibcTradeCallback() {
// @Override
// public void onTradeSuccess(AlibcTradeResult tradeResult) {
// Map<String, Object> results = new HashMap<>();
// if (AlibcResultType.TYPECART == tradeResult.resultType) {
// results.put("type", 1);
// } else if (AlibcResultType.TYPEPAY == tradeResult.resultType) {
// results.put("type", 0);
// results.put("payFailedOrders", tradeResult.payResult.payFailedOrders);
// results.put("paySuccessOrders", tradeResult.payResult.paySuccessOrders);
// }
// result.success(PluginResponse.success(results).toMap());
// }

@Override
public void onTradeSuccess(AlibcTradeResult tradeResult) {
public void onSuccess(int i) {
Map<String, Object> results = new HashMap<>();
if (AlibcResultType.TYPECART == tradeResult.resultType) {
results.put("type", 1);
} else if (AlibcResultType.TYPEPAY == tradeResult.resultType) {
results.put("type", 0);
results.put("payFailedOrders", tradeResult.payResult.payFailedOrders);
results.put("paySuccessOrders", tradeResult.payResult.paySuccessOrders);
}
// if (AlibcResultType.TYPECART == tradeResult.resultType) {
// results.put("type", 1);
// } else if (AlibcResultType.TYPEPAY == tradeResult.resultType) {
// results.put("type", 0);
// results.put("payFailedOrders", tradeResult.payResult.payFailedOrders);
// results.put("paySuccessOrders", tradeResult.payResult.paySuccessOrders);
// }
result.success(PluginResponse.success(results).toMap());
}

@@ -371,7 +477,7 @@ public class FlutterAlibcHandle {
* @param call
*/
public void syncForTaoke(MethodCall call) {
AlibcTradeSDK.setSyncForTaoke(call.argument("isSync"));
// AlibcTradeSDK.setSyncForTaoke(call.argument("isSync"));
}

/**
@@ -380,7 +486,7 @@ public class FlutterAlibcHandle {
* @param call
*/
public void useAlipayNative(MethodCall call) {
AlibcTradeSDK.setShouldUseAlipay(call.argument("isNeed"));
// AlibcTradeSDK.setShouldUseAlipay(call.argument("isNeed"));
}



+ 2
- 0
android/src/main/java/com/wxwx/flutter_alibc/FlutterAlibcPlugin.java 查看文件

@@ -29,6 +29,8 @@ public class FlutterAlibcPlugin implements MethodCallHandler {
handle.loginTaoBao(result);
} else if (call.method.equals("taoKeLogin")){
handle.taoKeLogin(call, result);
} else if (call.method.equals("taoKeLoginNew")){
handle.taoKeLoginNew(call, result);
} else if (call.method.equals("loginOut")){
handle.loginOut(result);
}else if (call.method.equals("openByUrl")){


+ 25
- 24
android/src/main/java/com/wxwx/flutter_alibc/PluginUtil.java 查看文件

@@ -1,9 +1,10 @@
package com.wxwx.flutter_alibc;

import com.alibaba.alibcprotocol.param.AlibcTaokeParams;
import com.alibaba.alibcprotocol.param.OpenType;

import static com.wxwx.flutter_alibc.PluginConstants.*;
import com.alibaba.baichuan.android.trade.model.OpenType;
import com.alibaba.baichuan.trade.biz.applink.adapter.AlibcFailModeType;
import com.alibaba.baichuan.trade.biz.core.taoke.AlibcTaokeParams;


import java.util.Map;

@@ -11,40 +12,40 @@ import java.util.Map;
* @Author karedem
* @Date 2019/9/10 11:42
* @Description 映射返回对应值
**/
**/
public class PluginUtil {

public static OpenType getOpenType(String open){
if (Auto_OpenType.equals(open)){
public static OpenType getOpenType(String open) {
if (Auto_OpenType.equals(open)) {
return OpenType.Auto;
}else {
return OpenType.Native;
} else {
return OpenType.Native;
}
}

public static String getClientType(String client){
if (client.equals(Tmall_ClientType)){
public static String getClientType(String client) {
if (client.equals(Tmall_ClientType)) {
return "tmall";
}else {
} else {
return "taobao";
}
}

public static AlibcFailModeType getFailModeType(String mode){
if (JumpH5_FailMode.equals(mode)){
return AlibcFailModeType.AlibcNativeFailModeJumpH5;
}else if (JumpDownloadPage_FailMode.equals(mode)){
return AlibcFailModeType.AlibcNativeFailModeJumpDOWNLOAD;
}else {
return AlibcFailModeType.AlibcNativeFailModeNONE;
}
}
public static AlibcTaokeParams getTaokeParams(Map<String, Object> taokePar){
// public static AlibcFailModeType getFailModeType(String mode) {
// if (JumpH5_FailMode.equals(mode)) {
// return AlibcFailModeType.AlibcNativeFailModeJumpH5;
// } else if (JumpDownloadPage_FailMode.equals(mode)) {
// return AlibcFailModeType.AlibcNativeFailModeJumpDOWNLOAD;
// } else {
// return AlibcFailModeType.AlibcNativeFailModeNONE;
// }
// }
public static AlibcTaokeParams getTaokeParams(Map<String, Object> taokePar) {
String pid = (String) taokePar.get("pid");
AlibcTaokeParams taokeParams = new AlibcTaokeParams("", "", "");
if (pid != null){
taokeParams.setPid(pid);
if (pid != null) {
taokeParams.pid = pid;
}
Object extParams = taokePar.get("extParams");
//TODO 其他参数待添加


+ 33
- 17
android/src/main/java/com/wxwx/flutter_alibc/WebActivity.java 查看文件

@@ -1,6 +1,7 @@
package com.wxwx.flutter_alibc;

import android.annotation.SuppressLint;

import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
@@ -24,13 +25,13 @@ import android.webkit.WebViewClient;
import android.widget.ImageView;
import android.widget.Toast;

import com.alibaba.baichuan.android.trade.AlibcTrade;
import com.alibaba.baichuan.android.trade.callback.AlibcTradeCallback;
import com.alibaba.baichuan.android.trade.model.AlibcShowParams;
import com.alibaba.baichuan.trade.biz.context.AlibcTradeResult;
import com.alibaba.baichuan.trade.biz.core.taoke.AlibcTaokeParams;
import com.alibaba.baichuan.trade.biz.login.AlibcLogin;
import com.alibaba.baichuan.trade.biz.login.AlibcLoginCallback;
import com.alibaba.alibclogin.AlibcLogin;
import com.alibaba.alibcprotocol.callback.AlibcLoginCallback;
import com.alibaba.alibcprotocol.callback.AlibcTradeCallback;
import com.alibaba.alibcprotocol.param.AlibcShowParams;
import com.alibaba.alibcprotocol.param.AlibcTaokeParams;
import com.baichuan.nb_trade.AlibcTrade;

import java.util.HashMap;
import java.util.Map;
@@ -68,11 +69,15 @@ public class WebActivity extends Activity {
// alibcTaokeParams.extraParams.put("taokeAppkey", SPUtils.getPrefString(mActivity, Pkey.APP_alliance_appkey, ""));
AlibcShowParams showParams = new AlibcShowParams();
showParams.setBackUrl("alisdk://");
AlibcTrade.openByUrl(WebActivity.this, "", url,
mainWeb, new MyBaichuanWebClient(), new MyWebChromeClient(), showParams,
AlibcTrade.openByUrl(WebActivity.this, url, showParams,
new AlibcTaokeParams("", "", ""), exParams, new AlibcTradeCallback() {
// @Override
// public void onTradeSuccess(AlibcTradeResult alibcTradeResult) {
//
// }

@Override
public void onTradeSuccess(AlibcTradeResult alibcTradeResult) {
public void onSuccess(int i) {

}

@@ -103,12 +108,16 @@ public class WebActivity extends Activity {
Map<String, String> exParams = new HashMap<>();//yhhpass参数
AlibcShowParams showParams = new AlibcShowParams();
showParams.setBackUrl("alisdk://");
AlibcTrade.openByUrl(WebActivity.this, "", url,
mainWeb, new MyBaichuanWebClient(), new MyWebChromeClient(), showParams,
AlibcTrade.openByUrl(WebActivity.this, url,showParams,
new AlibcTaokeParams("", "", ""), exParams, new AlibcTradeCallback() {
// @Override
// public void onTradeSuccess(AlibcTradeResult alibcTradeResult) {
// Log.d("cg", alibcTradeResult.toString());
// }

@Override
public void onTradeSuccess(AlibcTradeResult alibcTradeResult) {
Log.d("cg", alibcTradeResult.toString());
public void onSuccess(int i) {
}

@Override
@@ -336,10 +345,15 @@ public class WebActivity extends Activity {
// alibcTaokeParams.extraParams.put("taokeAppkey", SPUtils.getPrefString(mActivity, Pkey.APP_alliance_appkey, ""));
AlibcShowParams showParams = new AlibcShowParams();
showParams.setBackUrl("alisdk://");
AlibcTrade.openByUrl(WebActivity.this, "", url, mainWeb, new MyBaichuanWebClient(), new MyWebChromeClient(), showParams,
AlibcTrade.openByUrl(WebActivity.this, url, showParams,
new AlibcTaokeParams("", "", ""), exParams, new AlibcTradeCallback() {
// @Override
// public void onTradeSuccess(AlibcTradeResult alibcTradeResult) {
//
// }

@Override
public void onTradeSuccess(AlibcTradeResult alibcTradeResult) {
public void onSuccess(int i) {

}

@@ -440,8 +454,10 @@ public class WebActivity extends Activity {
// }
if (url.contains("maliprod.alipay.com") && !url.contains("confirmGoods.do")) {
AlibcLogin.getInstance().showLogin(new AlibcLoginCallback() {


@Override
public void onSuccess(int i, String s, String s1) {
public void onSuccess(String s, String s1) {

}



+ 19
- 15
android/src/main/java/com/wxwx/flutter_alibc/web/WebViewActivity.java 查看文件

@@ -10,19 +10,18 @@ import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Toast;

import com.alibaba.baichuan.android.trade.AlibcTrade;
import com.alibaba.baichuan.android.trade.callback.AlibcTradeCallback;
import com.alibaba.baichuan.android.trade.model.AlibcShowParams;
import com.alibaba.baichuan.android.trade.model.OpenType;
import com.alibaba.baichuan.trade.biz.applink.adapter.AlibcFailModeType;
import com.alibaba.baichuan.trade.biz.context.AlibcTradeResult;
import com.alibaba.baichuan.trade.biz.core.taoke.AlibcTaokeParams;

import com.alibaba.alibcprotocol.callback.AlibcTradeCallback;
import com.alibaba.alibcprotocol.param.AlibcShowParams;
import com.alibaba.alibcprotocol.param.AlibcTaokeParams;
import com.alibaba.baichuan.trade.common.utils.AlibcLogger;

import java.util.HashMap;
import java.util.Map;
import static com.wxwx.flutter_alibc.PluginConstants.*;
import static com.wxwx.flutter_alibc.PluginUtil.*;

import com.baichuan.nb_trade.AlibcTrade;
import com.wxwx.flutter_alibc.R;
import java.net.URLDecoder;

@@ -85,11 +84,11 @@ public class WebViewActivity extends Activity {
if (argument.get("taokeParams") != null){
taokeParams = getTaokeParams((HashMap<String, Object>)argument.get("taokeParams"));
}
if ("false".equals(argument.get("isNeedCustomNativeFailMode"))){
showParams.setNativeOpenFailedMode(AlibcFailModeType.AlibcNativeFailModeNONE);
}else if (argument.get(key_NativeFailMode) != null){
showParams.setNativeOpenFailedMode(getFailModeType(String.valueOf(argument.get(key_NativeFailMode))));
}
// if ("false".equals(argument.get("isNeedCustomNativeFailMode"))){
// showParams.setNativeOpenFailedMode(AlibcFailModeType.AlibcNativeFailModeNONE);
// }else if (argument.get(key_NativeFailMode) != null){
// showParams.setNativeOpenFailedMode(getFailModeType(String.valueOf(argument.get(key_NativeFailMode))));
// }

Map<String, String> trackParams = new HashMap<>();

@@ -114,11 +113,16 @@ public class WebViewActivity extends Activity {
}
};

AlibcTrade.openByUrl(WebViewActivity.this, "", url, webView,
client, new WebChromeClient(),
AlibcTrade.openByUrl(WebViewActivity.this, url,
showParams, taokeParams, trackParams, new AlibcTradeCallback() {
// @Override
// public void onTradeSuccess(AlibcTradeResult tradeResult) {}//不会回调

@Override
public void onTradeSuccess(AlibcTradeResult tradeResult) {}//不会回调
public void onSuccess(int i) {

}

@Override
public void onFailure(int code, String msg) {}//不会回调
});


二进制
查看文件


二进制
查看文件


二进制
查看文件


二进制
查看文件


二进制
查看文件


+ 1
- 1
example/.flutter-plugins-dependencies 查看文件

@@ -1 +1 @@
{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"flutter_alibc","dependencies":[]}]}
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_alibc","path":"D:\\\\zy_project\\\\zhiying_flutter_alibc\\\\","dependencies":[]}],"android":[{"name":"flutter_alibc","path":"D:\\\\zy_project\\\\zhiying_flutter_alibc\\\\","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"flutter_alibc","dependencies":[]}],"date_created":"2021-04-09 09:35:59.437953","version":"1.22.1"}

+ 3
- 1
example/android/app/build.gradle 查看文件

@@ -36,6 +36,7 @@ android {
applicationId "wxwx.com.flutter_alibc_example"
minSdkVersion 16
targetSdkVersion 28
multiDexEnabled true
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -73,5 +74,6 @@ dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.3.0-alpha02'
}

+ 1
- 1
example/android/app/src/main/AndroidManifest.xml 查看文件

@@ -17,7 +17,7 @@
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"
android:windowSoftInputMode="adjustResize">
<!-- This keeps the window background of the activity showing
until Flutter renders its first frame. It can be removed if


+ 4
- 1
example/android/build.gradle 查看文件

@@ -2,10 +2,13 @@ buildscript {
repositories {
google()
jcenter()
maven {
url "http://repo.baichuan-android.taobao.com/content/groups/BaichuanRepositories/"
}
}

dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.android.tools.build:gradle:3.3.2'
}
}



+ 3
- 1
example/android/gradle.properties 查看文件

@@ -2,4 +2,6 @@ org.gradle.jvmargs=-Xmx1536M

#android.useAndroidX=false
#android.enableJetifier=true
android.enableR8=true
#android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true

+ 2
- 2
example/android/gradle/wrapper/gradle-wrapper.properties 查看文件

@@ -1,6 +1,6 @@
#Fri Jun 23 08:50:38 CEST 2017
#Wed Apr 07 18:44:33 CST 2021
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
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip

+ 10
- 5
example/ios/Flutter/flutter_export_environment.sh 查看文件

@@ -1,10 +1,15 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/Users/fnuser02/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/fnuser02/Documents/fnuoProject/flutter_open/flutter_alibc/example"
export "FLUTTER_TARGET=lib/main.dart"
export "FLUTTER_ROOT=D:\flutter\flutter"
export "FLUTTER_APPLICATION_PATH=D:\zy_project\zhiying_flutter_alibc\example"
export "FLUTTER_TARGET=lib\main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
export "FLUTTER_FRAMEWORK_DIR=/Users/fnuser02/flutter/bin/cache/artifacts/engine/ios"
export "SYMROOT=${SOURCE_ROOT}/../build\ios"
export "OTHER_LDFLAGS=$(inherited) -framework Flutter"
export "FLUTTER_FRAMEWORK_DIR=D:\flutter\flutter\bin\cache\artifacts\engine\ios"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=false"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=.packages"

+ 20
- 10
example/lib/main.dart 查看文件

@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_alibc/alibc_const_key.dart';
import 'package:flutter_alibc/flutter_alibc.dart';
import 'package:flutter_alibc/alibc_model.dart';

void main() => runApp(MyApp());

@@ -71,7 +72,9 @@ class _MyAppState extends State<MyApp> {
// var waite3s = await FlutterAlibc.openItemDetail(itemID: "12345");
// 如果什么都不给
var result = await FlutterAlibc.initAlibc();
print(result);
print("--------------");
print(result.errorMessage+"\n"+result.errorCode);
print("--------------");
} on Exception {}
},
),
@@ -79,8 +82,7 @@ class _MyAppState extends State<MyApp> {
child: Text("登录淘宝"),
onPressed: () async {
var result = await FlutterAlibc.loginTaoBao();
print(
"登录淘宝 ${result.data.nick} ${result.data.topAccessToken}");
print("登录淘宝 ${result.data.nick} ${result.data.topAccessToken}");
},
),
FlatButton(
@@ -90,15 +92,25 @@ class _MyAppState extends State<MyApp> {
},
),
FlatButton(
child: Text("淘客登录,二次授权"),
child: Text("淘客登录,渠道授权"),
onPressed: () async {
var result = await FlutterAlibc.taoKeLogin(
url:
"https://oauth.taobao.com/authorize?response_type=token&client_id=27646673&state=1212&view=wap",
openType: AlibcOpenType.AlibcOpenTypeNative,
isNeedCustomNativeFailMode: true,
nativeFailMode:
AlibcNativeFailMode.AlibcNativeFailModeJumpH5);
nativeFailMode: AlibcNativeFailMode.AlibcNativeFailModeJumpH5);
print("access token ${result["accessToken"]}");
},
),
FlatButton(
child: Text("淘客登录,新版渠道授权"),
onPressed: () async {
var result = await FlutterAlibc.taoKeLoginNew(
"测试名字",
"31333495"
);
print(result);
print("access token ${result["accessToken"]}");
},
),
@@ -110,8 +122,7 @@ class _MyAppState extends State<MyApp> {
"https://uland.taobao.com/coupon/edetail?e=0I2EBL%2BTWswGQASttHIRqRXxIesJCFV0jSsDEwaP11URqogtr65NL3IIxArmwXZQtYdj3OrQBBwJkllDQLUC%2B79fwBwwUiqlvyfAqbG%2BQWkG6QT52O7rmXYefz8NXcoYTJnbK5InWzlFfSAQOJJoy8NEaV3mm%2FQSzjZt5gElMznom9kMiklcP0KJ92VgfYGd&traceId=0b0d82cf15669814548736276e3d95&union_lens=lensId:0b0b6466_0c0d_16cd75f7c39_528f&xId=6MboRwsAi2s8Glbqt3lJLAwSlyrPyBLCZ01KOk6QzKCNhw8C6RjXgA1bNbZdKzp30gOqd1J5j1k7ei7HYId1QZ&ut_sk=1.utdid_null_1566981455011.TaoPassword-Outside.taoketop&sp_tk=77+lTU5nMllrdHRqSVLvv6U=",
//backUrl: "tbopen27822502:https://h5.m.taobao.com",
isNeedCustomNativeFailMode: true,
nativeFailMode:
AlibcNativeFailMode.AlibcNativeFailModeJumpH5);
nativeFailMode: AlibcNativeFailMode.AlibcNativeFailModeJumpH5);
print(result);
},
),
@@ -122,8 +133,7 @@ class _MyAppState extends State<MyApp> {
itemID: "575688730394",
schemeType: AlibcSchemeType.AlibcSchemeTaoBao,
isNeedCustomNativeFailMode: true,
nativeFailMode:
AlibcNativeFailMode.AlibcNativeFailModeJumpH5);
nativeFailMode: AlibcNativeFailMode.AlibcNativeFailModeJumpH5);
print(result);
},
),


+ 33
- 75
example/pubspec.lock 查看文件

@@ -1,62 +1,48 @@
# 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.11"
args:
dependency: transitive
description:
name: args
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.5.2"
async:
dependency: transitive
description:
name: async
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.4.0"
version: "2.5.0-nullsafety.1"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.5"
charcode:
version: "2.1.0-nullsafety.1"
characters:
dependency: transitive
description:
name: charcode
name: characters
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.2"
collection:
version: "1.1.0-nullsafety.3"
charcode:
dependency: transitive
description:
name: collection
name: charcode
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.14.11"
convert:
version: "1.2.0-nullsafety.1"
clock:
dependency: transitive
description:
name: convert
name: clock
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.1"
crypto:
version: "1.1.0-nullsafety.1"
collection:
dependency: transitive
description:
name: crypto
name: collection
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.3"
version: "1.15.0-nullsafety.3"
cupertino_icons:
dependency: "direct main"
description:
@@ -64,6 +50,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.2"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0-nullsafety.1"
flutter:
dependency: "direct main"
description: flutter
@@ -81,55 +74,27 @@ packages:
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.4"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.12.6"
version: "0.12.10-nullsafety.1"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.8"
version: "1.3.0-nullsafety.3"
path:
dependency: transitive
description:
name: path
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.6.4"
pedantic:
dependency: transitive
description:
name: pedantic
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.8.0+1"
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.0.5"
version: "1.8.0-nullsafety.1"
sky_engine:
dependency: transitive
description: flutter
@@ -141,62 +106,55 @@ packages:
name: source_span
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.5.5"
version: "1.8.0-nullsafety.2"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.9.3"
version: "1.10.0-nullsafety.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.0"
version: "2.1.0-nullsafety.1"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.5"
version: "1.1.0-nullsafety.1"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
version: "1.2.0-nullsafety.1"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.2.11"
version: "0.2.19-nullsafety.2"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.6"
version: "1.3.0-nullsafety.3"
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.5.0"
version: "2.1.0-nullsafety.3"
sdks:
dart: ">=2.4.0 <3.0.0"
dart: ">=2.10.0-110 <2.11.0"

+ 17
- 0
lib/flutter_alibc.dart 查看文件

@@ -106,6 +106,23 @@ class FlutterAlibc {
return result;
}

///
/// @description: 渠道授权,获取access_token
/// name app名字
/// alibcAppKey 百川Key
/// Map<String,String>
static Future<Map<dynamic, dynamic>> taoKeLoginNew(
String name,
String alibcAppKey) async {

Map result = await _channel.invokeMethod("taoKeLoginNew", {
"name": name,
"alibcAppKey": alibcAppKey,
});

return result;
}

///
/// @description: 通过url打开,包括h5,唤起手淘等
/// @param


+ 31
- 73
pubspec.lock 查看文件

@@ -1,62 +1,55 @@
# 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.11"
args:
dependency: transitive
description:
name: args
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.5.2"
async:
dependency: transitive
description:
name: async
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.4.0"
version: "2.5.0-nullsafety.1"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.5"
version: "2.1.0-nullsafety.1"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0-nullsafety.3"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.2"
collection:
version: "1.2.0-nullsafety.1"
clock:
dependency: transitive
description:
name: collection
name: clock
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.14.11"
convert:
version: "1.1.0-nullsafety.1"
collection:
dependency: transitive
description:
name: convert
name: collection
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.1"
crypto:
version: "1.15.0-nullsafety.3"
fake_async:
dependency: transitive
description:
name: crypto
name: fake_async
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.3"
version: "1.2.0-nullsafety.1"
flutter:
dependency: "direct main"
description: flutter
@@ -67,55 +60,27 @@ packages:
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.4"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.12.6"
version: "0.12.10-nullsafety.1"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.8"
version: "1.3.0-nullsafety.3"
path:
dependency: transitive
description:
name: path
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.6.4"
pedantic:
dependency: transitive
description:
name: pedantic
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.8.0+1"
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.0.5"
version: "1.8.0-nullsafety.1"
sky_engine:
dependency: transitive
description: flutter
@@ -127,62 +92,55 @@ packages:
name: source_span
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.5.5"
version: "1.8.0-nullsafety.2"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.9.3"
version: "1.10.0-nullsafety.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.0"
version: "2.1.0-nullsafety.1"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.5"
version: "1.1.0-nullsafety.1"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
version: "1.2.0-nullsafety.1"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.2.11"
version: "0.2.19-nullsafety.2"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.6"
version: "1.3.0-nullsafety.3"
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.5.0"
version: "2.1.0-nullsafety.3"
sdks:
dart: ">=2.4.0 <3.0.0"
dart: ">=2.10.0-110 <2.11.0"

正在加载...
取消
保存