我如何创建一个按钮,当用户单击该按钮时,页面将刷新并显示新内容?
请帮助我。
调用setState(() {})方法。为此,您需要一个StatefulWidget。
setState(() {})
StatefulWidget