setState method

  1. @protected
  2. @mustCallSuper
void setState(
  1. VoidCallback callback
)

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();
}