TabControllerRaiiExt extension

Extension for managing TabController lifecycle.

Example:

class MyWidgetState extends State<MyWidget>
    with TickerProviderStateMixin, LifecycleAwareWidgetStateMixin {
  late final tabController = TabController(length: 3, vsync: this)
    .withLifecycle(this, debugLabel: 'TabBar');
}
on

Methods

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

Available on TabController, provided by the TabControllerRaiiExt extension

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