feat:增加加载中组件
This commit is contained in:
@@ -39,15 +39,16 @@ Future<List<RecipeSummary>> queryRecipeApi(RecipeQuery recipeQuery) {
|
||||
return HttpUtil().get<List<RecipeSummary>>(
|
||||
"/food/recipe",
|
||||
queryParameters: recipeQuery.toJson(),
|
||||
converter: (data) => convertListResponse<RecipeSummary>(data, RecipeSummary.fromJson),
|
||||
converter:
|
||||
(data) =>
|
||||
convertListResponse<RecipeSummary>(data, RecipeSummary.fromJson),
|
||||
);
|
||||
}
|
||||
|
||||
Future<List<String>> queryFoodNameListApi() {
|
||||
return HttpUtil().get<List<String>>(
|
||||
"/food/recipe/name",
|
||||
converter:
|
||||
(data) => convertListResponse<String>(data, (json) => json.toString()),
|
||||
converter: (data) => convertListStringResponse(data),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -87,14 +88,14 @@ Future<List<FoodRecord>> queryRecordApi(String startDate, String endDate) {
|
||||
return HttpUtil().get<List<FoodRecord>>(
|
||||
"/food/record",
|
||||
queryParameters: {"startDate": startDate, "endDate": endDate},
|
||||
converter: (data) => convertListResponse<FoodRecord>(data, FoodRecord.fromJson),
|
||||
converter:
|
||||
(data) => convertListResponse<FoodRecord>(data, FoodRecord.fromJson),
|
||||
);
|
||||
}
|
||||
|
||||
Future<List<String>> queryCategoryApi() {
|
||||
return HttpUtil().get<List<String>>(
|
||||
"/food/category",
|
||||
converter:
|
||||
(data) => convertListResponse<String>(data, (json) => json.toString()),
|
||||
converter: (data) => convertListStringResponse(data),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user