Skip to content

Commit 59da873

Browse files
Remove deprecated KeepAliveHandle.release (#143961)
flutter/flutter#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?
1 parent 10a50bc commit 59da873

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

packages/flutter/lib/src/widgets/automatic_keep_alive.dart

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -319,19 +319,6 @@ class KeepAliveNotification extends Notification {
319319
/// consider using [AutomaticKeepAliveClientMixin], which uses a
320320
/// [KeepAliveHandle] internally.
321321
class KeepAliveHandle extends ChangeNotifier {
322-
/// Trigger the listeners to indicate that the widget
323-
/// no longer needs to be kept alive.
324-
///
325-
/// This method does not call [dispose]. When the handle is not needed
326-
/// anymore, it must be [dispose]d regardless of whether notifying listeners.
327-
@Deprecated(
328-
'Use dispose instead. '
329-
'This feature was deprecated after v3.3.0-0.0.pre.',
330-
)
331-
void release() {
332-
notifyListeners();
333-
}
334-
335322
@override
336323
void dispose() {
337324
notifyListeners();
@@ -366,7 +353,6 @@ mixin AutomaticKeepAliveClientMixin<T extends StatefulWidget> on State<T> {
366353
}
367354

368355
void _releaseKeepAlive() {
369-
// Dispose and release do not imply each other.
370356
_keepAliveHandle!.dispose();
371357
_keepAliveHandle = null;
372358
}

0 commit comments

Comments
 (0)