gameInout static method

dynamic gameInout(
  1. String gameCorp,
  2. int type,
  3. dynamic onSuccess(
    1. dynamic data
    ),
  4. dynamic onError(
    1. String errStr
    )?,
)

上下分 gameCorp 游戏厂家 transferAmount 转账金额 "type": 1转入游戏,2转回app

Implementation

static gameInout(
  String gameCorp,
  int type,
  Function(dynamic data) onSuccess,
  Function(String errStr)? onError,
) {
  DioManager().request<dynamic>(RequestType.POST, RequestApi.apiGameInout, params: {'gameCorp': gameCorp, 'type': type}, onSuccess: (data) {
    onSuccess(data);
  }, onError: (error) {
    if (onError != null) {
      onError(error.message);
    }
  });
}