現時点では、単純な HttpRequest を使用して JSON ファイルを取得しています。
void getConfigData(String url) {
var request = new HttpRequest.get(url, this.onSuccess);
}
void onSuccess(HttpRequest req) {
JsonObject conf = new JsonObject.fromJsonString(req.responseText);
MenuItemCollection top_bar = new MenuItemCollection();
// and parse the JSON data ...
}
私が知りたいのは、コールバックの代わりに Futures を使用する必要があるかどうかです。