hideAllChannel static method
Future<bool>
hideAllChannel(
{ - dynamic errorCallback(
- int? errorCode,
- String? errorMessage
)?,
})
Implementation
static Future<bool> hideAllChannel(
{
Function(int? errorCode, String? errorMessage)? errorCallback
}) async
{
if (!_isInitialized(errorCallback: errorCallback)) { return false; }
if (!_checkAuthInfo(errorCallback: errorCallback)) { return false; }
try {
Map<String, dynamic> body = Map.from({});
String url = "/channels/hide/all";
await HttpUtil.postJson(url, body);
return true;
} on TPException catch(e) {
Logger.log("$e");
if(errorCallback != null) { errorCallback(e.getCode(), e.getMessage()); }
} catch(e){
Logger.log("$e");
if(errorCallback != null) { errorCallback(-1, e.toString()); }
}
return false;
}