Unverified Commit 59da873e authored by LongCatIsLooong's avatar LongCatIsLooong Committed by GitHub

Remove deprecated `KeepAliveHandle.release` (#143961)

https://github.com/flutter/flutter/issues/143956

I still did not include a dartfix since a dartfix that replaces `release` with `dispose` would change the semantics and may cause a runtime crash instead of a build error.

@Piinks  does setting `bulkApply` to false force the user to apply the fix to every occurrence one by one in their IDE? If so then it seems that would be the way to go for this deprecation?
parent 10a50bcc
......@@ -319,19 +319,6 @@ class KeepAliveNotification extends Notification {
/// consider using [AutomaticKeepAliveClientMixin], which uses a
/// [KeepAliveHandle] internally.
class KeepAliveHandle extends ChangeNotifier {
/// Trigger the listeners to indicate that the widget
/// no longer needs to be kept alive.
///
/// This method does not call [dispose]. When the handle is not needed
/// anymore, it must be [dispose]d regardless of whether notifying listeners.
@Deprecated(
'Use dispose instead. '
'This feature was deprecated after v3.3.0-0.0.pre.',
)
void release() {
notifyListeners();
}
@override
void dispose() {
notifyListeners();
......@@ -366,7 +353,6 @@ mixin AutomaticKeepAliveClientMixin<T extends StatefulWidget> on State<T> {
}
void _releaseKeepAlive() {
// Dispose and release do not imply each other.
_keepAliveHandle!.dispose();
_keepAliveHandle = null;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment