flutter调用函数后如何刷新页面?

How to get the page refreshed after the function calling in flutter?

我正在使用以下函数在按下按钮时调用,它会更新后端服务器中的数据。如果功能成功,我希望页面重新加载并在页面上更新新数据。我应该如何在 Flutter 中执行此操作?

approvalbutton() async {

    var jsonResponse = null;

    var response = await http.post(approvalapiurl, body: data);
    if (response.statusCode == 200) {
      jsonResponse = json.decode(response.body);
      print('Response status: ${response.statusCode}');
      print('Response body: ${response.body}');
      String errorcheck = jsonResponse['error'];

      if (errorcheck == "false") {


       print('success');

      }
      else {
       print('failed');
      }
    }

  }

使用 setState() 方法重建有状态小部件