我正在使用rxdart来管理我的状态,以便可以轻松地重用
我尝试使用打印调试快照,但是没有返回结果
String url = '${_staticData.MainLink}/mobile/auth/my_acoount';
var body = json.encode({'id_token': LS.getItem("apiKey")});
var response = await http.post(url, body: body, headers: {
'Authorization': LS.getItem("apiKey"),
'Content-type': 'application/json',
'Accept': 'application/json',
});
if (response.statusCode == 200) {
return compute(userFromJson, response.body);
} else {
throw Exception('Failed to Load');
}
如果您想查看我的完整代码,请参阅我的仓库:https://github.com/farhanrahmadi/cariin