更新时间:2023-12-03 12:49:34
TLDR:如果在 then()
内部调用 setState()
否,它将在一切完成之前执行,并且完全没有效果.
TLDR: Call setState()
from inside then()
if not, it will be executed before everything completes and have no effect at all.
getUser().then((response) {
//Your stuff
setState(() {}); //refresh
});