|
@@ -48,7 +48,7 @@ object FlutterBridgeManager : IBridgeApi {
|
|
|
mNativeEventRegistry.init(flutterEngine)
|
|
mNativeEventRegistry.init(flutterEngine)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- override fun isLogin(onSuccess: (Boolean) -> Unit, onFail: (String) -> Unit) {
|
|
|
|
|
|
|
+ override fun isLogin(onSuccess: (Boolean) -> Unit, onFail: (errorCode: Int, errorMsg: String) -> Unit) {
|
|
|
mFlutterMethodCaller.callMethod<Boolean>(
|
|
mFlutterMethodCaller.callMethod<Boolean>(
|
|
|
FlutterMethod.IS_LOGIN.methodName,
|
|
FlutterMethod.IS_LOGIN.methodName,
|
|
|
isReturnJson = false,
|
|
isReturnJson = false,
|
|
@@ -58,7 +58,7 @@ object FlutterBridgeManager : IBridgeApi {
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- override fun isMember(onSuccess: (Boolean) -> Unit, onFail: (String) -> Unit) {
|
|
|
|
|
|
|
+ override fun isMember(onSuccess: (Boolean) -> Unit, onFail: (errorCode: Int, errorMsg: String) -> Unit) {
|
|
|
mFlutterMethodCaller.callMethod<Boolean>(
|
|
mFlutterMethodCaller.callMethod<Boolean>(
|
|
|
FlutterMethod.IS_MEMBER.methodName,
|
|
FlutterMethod.IS_MEMBER.methodName,
|
|
|
isReturnJson = false,
|
|
isReturnJson = false,
|
|
@@ -96,7 +96,7 @@ object FlutterBridgeManager : IBridgeApi {
|
|
|
|
|
|
|
|
override fun getKeyboardList(
|
|
override fun getKeyboardList(
|
|
|
onSuccess: (resultObj: KeyboardListResp) -> Unit,
|
|
onSuccess: (resultObj: KeyboardListResp) -> Unit,
|
|
|
- onFail: (msg: String) -> Unit
|
|
|
|
|
|
|
+ onFail: (errorCode: Int, errorMsg: String) -> Unit
|
|
|
) {
|
|
) {
|
|
|
mFlutterMethodCaller.callMethod<KeyboardListResp>(
|
|
mFlutterMethodCaller.callMethod<KeyboardListResp>(
|
|
|
FlutterMethod.GET_KEYBOARD_LIST.methodName,
|
|
FlutterMethod.GET_KEYBOARD_LIST.methodName,
|
|
@@ -109,7 +109,7 @@ object FlutterBridgeManager : IBridgeApi {
|
|
|
override fun selectedKeyboard(
|
|
override fun selectedKeyboard(
|
|
|
keyboardId: String,
|
|
keyboardId: String,
|
|
|
onSuccess: (EmptyResp) -> Unit,
|
|
onSuccess: (EmptyResp) -> Unit,
|
|
|
- onFail: (String) -> Unit
|
|
|
|
|
|
|
+ onFail: (errorCode: Int, errorMsg: String) -> Unit
|
|
|
) {
|
|
) {
|
|
|
mFlutterMethodCaller.callMethod<EmptyResp>(
|
|
mFlutterMethodCaller.callMethod<EmptyResp>(
|
|
|
FlutterMethod.SELECTED_KEY_BOARD.methodName,
|
|
FlutterMethod.SELECTED_KEY_BOARD.methodName,
|
|
@@ -123,7 +123,7 @@ object FlutterBridgeManager : IBridgeApi {
|
|
|
|
|
|
|
|
override fun getCurrentKeyboardInfo(
|
|
override fun getCurrentKeyboardInfo(
|
|
|
onSuccess: (CurrentKeyboardIdResp) -> Unit,
|
|
onSuccess: (CurrentKeyboardIdResp) -> Unit,
|
|
|
- onFail: (String) -> Unit
|
|
|
|
|
|
|
+ onFail: (errorCode: Int, errorMsg: String) -> Unit
|
|
|
) {
|
|
) {
|
|
|
mFlutterMethodCaller.callMethod<CurrentKeyboardIdResp>(
|
|
mFlutterMethodCaller.callMethod<CurrentKeyboardIdResp>(
|
|
|
FlutterMethod.GET_CURRENT_KEYBOARD_INFO.methodName,
|
|
FlutterMethod.GET_CURRENT_KEYBOARD_INFO.methodName,
|
|
@@ -136,7 +136,7 @@ object FlutterBridgeManager : IBridgeApi {
|
|
|
override fun getCharacterList(
|
|
override fun getCharacterList(
|
|
|
keyboardId: String,
|
|
keyboardId: String,
|
|
|
onSuccess: (CharacterListResp) -> Unit,
|
|
onSuccess: (CharacterListResp) -> Unit,
|
|
|
- onFail: (String) -> Unit
|
|
|
|
|
|
|
+ onFail: (errorCode: Int, errorMsg: String) -> Unit
|
|
|
) {
|
|
) {
|
|
|
mFlutterMethodCaller.callMethod<CharacterListResp>(
|
|
mFlutterMethodCaller.callMethod<CharacterListResp>(
|
|
|
FlutterMethod.GET_CHARACTER_LIST.methodName,
|
|
FlutterMethod.GET_CHARACTER_LIST.methodName,
|
|
@@ -149,7 +149,7 @@ object FlutterBridgeManager : IBridgeApi {
|
|
|
|
|
|
|
|
override fun getPrologueList(
|
|
override fun getPrologueList(
|
|
|
onSuccess: (PrologueListResp) -> Unit,
|
|
onSuccess: (PrologueListResp) -> Unit,
|
|
|
- onFail: (String) -> Unit
|
|
|
|
|
|
|
+ onFail: (errorCode: Int, errorMsg: String) -> Unit
|
|
|
) {
|
|
) {
|
|
|
mFlutterMethodCaller.callMethod<PrologueListResp>(
|
|
mFlutterMethodCaller.callMethod<PrologueListResp>(
|
|
|
FlutterMethod.GET_PROLOGUE_LIST.methodName,
|
|
FlutterMethod.GET_PROLOGUE_LIST.methodName,
|
|
@@ -162,7 +162,7 @@ object FlutterBridgeManager : IBridgeApi {
|
|
|
override fun chatSuperReply(
|
|
override fun chatSuperReply(
|
|
|
req: SuperReplyReq,
|
|
req: SuperReplyReq,
|
|
|
onSuccess: (SuperReplyResp) -> Unit,
|
|
onSuccess: (SuperReplyResp) -> Unit,
|
|
|
- onFail: (String) -> Unit
|
|
|
|
|
|
|
+ onFail: (errorCode: Int, errorMsg: String) -> Unit
|
|
|
) {
|
|
) {
|
|
|
mFlutterMethodCaller.callMethod<SuperReplyResp>(
|
|
mFlutterMethodCaller.callMethod<SuperReplyResp>(
|
|
|
FlutterMethod.CHAT_SUPER_REPLY.methodName,
|
|
FlutterMethod.CHAT_SUPER_REPLY.methodName,
|
|
@@ -180,7 +180,7 @@ object FlutterBridgeManager : IBridgeApi {
|
|
|
override fun chatSuperSpeak(
|
|
override fun chatSuperSpeak(
|
|
|
req: SuperSpeakReq,
|
|
req: SuperSpeakReq,
|
|
|
onSuccess: (SuperSpeakResp) -> Unit,
|
|
onSuccess: (SuperSpeakResp) -> Unit,
|
|
|
- onFail: (String) -> Unit
|
|
|
|
|
|
|
+ onFail: (errorCode: Int, errorMsg: String) -> Unit
|
|
|
) {
|
|
) {
|
|
|
mFlutterMethodCaller.callMethod<SuperSpeakResp>(
|
|
mFlutterMethodCaller.callMethod<SuperSpeakResp>(
|
|
|
FlutterMethod.CHAT_SUPER_SPEAK.methodName,
|
|
FlutterMethod.CHAT_SUPER_SPEAK.methodName,
|
|
@@ -198,7 +198,7 @@ object FlutterBridgeManager : IBridgeApi {
|
|
|
override fun chatPrologue(
|
|
override fun chatPrologue(
|
|
|
name: String,
|
|
name: String,
|
|
|
onSuccess: (PrologueResp) -> Unit,
|
|
onSuccess: (PrologueResp) -> Unit,
|
|
|
- onFail: (String) -> Unit
|
|
|
|
|
|
|
+ onFail: (errorCode: Int, errorMsg: String) -> Unit
|
|
|
) {
|
|
) {
|
|
|
mFlutterMethodCaller.callMethod<PrologueResp>(
|
|
mFlutterMethodCaller.callMethod<PrologueResp>(
|
|
|
FlutterMethod.CHAT_PROLOGUE.methodName,
|
|
FlutterMethod.CHAT_PROLOGUE.methodName,
|