无法将参数类型“Map
void getData({
required String url,
required Map query,
}) {
dio.get(
url,
queryParameters: query,
);
}
答案 0 :(得分:2)
明确定义您的 Map
类型参数:
// vvvvvvvvvvvvvvvvv
void getData({required String url, required Map<String, dynamic> query}) {
dio.get(url, queryParameters: query);
}