applyAnchor static method

dynamic applyAnchor(
  1. int type,
  2. String cover,
  3. String video,
  4. String ptAccount,
  5. dynamic onSuccess(
    1. dynamic data
    ),
  6. dynamic onError(
    1. String errStr
    )?,
)

申请主播 cover: 照片,video: 视频, pt potato账号

Implementation

static applyAnchor(
  int type,
  String cover,
  String video,
  String ptAccount,
  Function(dynamic data) onSuccess,
  Function(String errStr)? onError,
) {
  DioManager().request<dynamic>(RequestType.POST, RequestApi.apiApplyAnchor, params: {'anchorType': type, 'cover': cover, 'video': video, 'ptAccount': ptAccount},
      onSuccess: (data) {
    onSuccess(data);
  }, onError: (error) {
    if (onError != null) {
      onError(error.message);
    }
  });
}