Dispose KeepAliveHandle. (#108227)

This commit is contained in:
Polina Cherkasova 2022-07-26 11:25:59 -07:00 committed by GitHub
parent e05ae3cac7
commit fe16c206ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -353,7 +353,9 @@ mixin AutomaticKeepAliveClientMixin<T extends StatefulWidget> on State<T> {
}
void _releaseKeepAlive() {
// Dispose and release do not imply each other.
_keepAliveHandle!.release();
_keepAliveHandle!.dispose();
_keepAliveHandle = null;
}