ox_onekey_flutter 0.0.4 copy "ox_onekey_flutter: ^0.0.4" to clipboard
ox_onekey_flutter: ^0.0.4 copied to clipboard

ox_sai_sdk

ox_onekey_flutter #

ox_sai_sdk

Getting Started #

// Platform messages are asynchronous, so we initialize in an async method. Future

//获取版本号
String sdkVersion;
try {
sdkVersion = await OxSaiFlutterSdk.sdkVersion;
} on PlatformException {
sdkVersion = 'Failed to get platform version.';
}

//初始化SDK
String appid = "4D416882FC3D036*******4881A7CD45C82";
String appsecret = "D4BD7ED3AFF********289CBFF70EF3BC94";
Map initSaiSdkResponse = await OxSaiFlutterSdk.initSaiSDK(appid,appsecret);
print(initSaiSdkResponse);

}

//一键登录
Future<void> onekeyLogin() async{

Map authResponse = await OxSaiFlutterSdk.onekeyLogin();
print(authResponse);

}

//本机号码校验
Future<void> authMobilePhone() async{
Map authResponse = await OxSaiFlutterSdk.mobileAuth();
print(authResponse);
}

//预取号
Future<void> preLogin() async{
Map authResponse = await OxSaiFlutterSdk.preLogin();
print(authResponse);
}
//关闭授权页
Future<void> dismissLoginPage() async{
await OxSaiFlutterSdk.dismissLoginPage();
}

}