setState method
Notify associated widgets of updates.
callback
is executed when notifying updates.
関連付けれらたウィジェットに更新を通知します。
更新を通知する際にcallback
が実行されます。
Implementation
@protected
@mustCallSuper
void setState(VoidCallback callback) {
WidgetsBinding.instance.scheduleFrameCallback((_) {
if (_disposed) {
return;
}
callback.call();
});
_notifyListeners();
}