PersonBloc(this.blueApi) {
print('getPeople bloc constructor'); // this gets called once, on construction so therefore i.e. spawning the bloc object non-stop is not the reason
results = _pageName.asyncMap((page) async {
print("call"); //this is getting called over and over
return await blueApi.getPeople(page);
});
}
以上代码始终不间断地调用asyncMap((){})
内部的内容。有人可以向我解释原因吗?我猜想这在API和电池上一定有点难,所以我需要更改它。我对Reactx一无所知。