autoContextDispose<T extends ChangeNotifier> function
- @Deprecated('Use KaeruWidget instead. This will be removed in a future version.')
- 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;
}