WidgetStatesControllerRaiiExt extension

Extension for managing WidgetStatesController lifecycle.

Example:

final statesController = WidgetStatesController()
  .withLifecycle(this, debugLabel: 'ButtonStates');
on

Methods

withLifecycle(RaiiLifecycleAware lifecycleAware, {String? debugLabel}) WidgetStatesController

Available on WidgetStatesController, provided by the WidgetStatesControllerRaiiExt extension

Attaches this states controller to a RaiiLifecycleAware object for automatic disposal.