apiGetSmsCode static method

dynamic apiGetSmsCode(
  1. dynamic dict,
  2. dynamic callBack, {
  3. dynamic onMessage(
    1. String msg
    )?,
})

发送短信验证码

Implementation

static apiGetSmsCode(dict, callBack, {Function(String msg)? onMessage}) {
  DioManager().request<dynamic>(RequestType.POST, RequestApi.apiGetSmsCode,
      params: dict, onSuccess: (data) {
    // onSuccess
    callBack(data);
  }, onError: (error) {
    // when called , already show toast, then do another things
  }, onStart: () {
    // onStart
  }, onFinish: () {
    // onFinish
  }, onMessage: (msg) {
    // onMessage
    if (onMessage != null) {
      onMessage(msg);
    }
  });
}