I am using this method in three screen(statful widgets),is there any way to create once and reuse it in other statfulwidgets?

前端 未结 0 800
栀梦
栀梦 2020-12-01 13:16

Future getScreenData() async { String url = \'rest api here\'; http.Response response = await http.get(url); if (response.statusCode == 200) { setState(() { screenData = jso

相关标签:
回答
  • 消灭零回复
提交回复
热议问题