autoContextDispose<T extends ChangeNotifier> function

  1. @Deprecated('Use KaeruWidget instead. This will be removed in a future version.')
T autoContextDispose<T extends ChangeNotifier>(
  1. T notifier
)

Schedules a ChangeNotifier to be disposed automatically when the widget is unmounted.

Note: This is part of the deprecated defineWidget API.

Implementation

@Deprecated('Use KaeruWidget instead. This will be removed in a future version.')
T autoContextDispose<T extends ChangeNotifier>(T notifier) {
  useState().notifiersStore.add(notifier);
  return notifier;
}