bindController method

BindController<S>? bindController()

Binds a controller to this state.

Override this method to provide your controller instance and configuration. Return null if you're managing the controller lifecycle manually.

Example:

@override
BindController<MyController> bindController() {
  return BindController(
    () => MyController(),
    autoDispose: true,  // Auto-dispose when widget is removed
    lazyBind: false,    // Create immediately
  );
}

Implementation

BindController<S>? bindController() => null;