BindController<S> constructor

BindController<S>({
  1. required S controller(),
  2. bool autoDispose = true,
  3. bool lazyBind = true,
})

Creates a BindController configuration.

Parameters:

  • controller: Factory function for creating the controller instance
  • autoDispose: Auto-dispose on widget removal (default: true)
  • lazyBind: Lazy initialization (default: true)

Example:

// Eager creation, auto-dispose
BindController(
  controller: () => MyController(),
  lazyBind: false,
);

// Lazy creation, manual management
BindController(
  controller: () => SharedController(),
  autoDispose: false,
  lazyBind: true,
);

Implementation

BindController({
  required this.controller,
  this.autoDispose = true,
  this.lazyBind = true,
});