getAppInfo method

Future<void> getAppInfo()

Implementation

Future<void> getAppInfo() async {
  final platform = Platform.isIOS? 3 : 2;
  final url = Uri.parse('${_wepinBaseUrl}app/info?platform=$platform');
  final response = await http.get(url, headers: headers);
  if (response.statusCode >= 200 && response.statusCode < 300) {
    return;
  } else {
    throw WepinError(WepinErrorCode.apiRequestError, 'code: ${response.statusCode} , body: ${response.body}');
  }
}