我有一个显示产品的简单页面,我正在尝试使用riverpod 和futureprovider,但是仅在我第一次访问该页面时才调用future?
final productInfo = FutureProvider<Map<String, dynamic>>((ref) async {
final response =
await http.get('https://www.api.com/$clickedID');
final content = json.decode(response.body) as Map<String, dynamic>;
return content;
});