Unverified Commit 7a2b187c authored by Tomasz Gucio's avatar Tomasz Gucio Committed by GitHub

Dispose ValueNotifier instances in LicensePage state classes (#104589)

parent 74cfc3db
...@@ -426,6 +426,12 @@ class LicensePage extends StatefulWidget { ...@@ -426,6 +426,12 @@ class LicensePage extends StatefulWidget {
class _LicensePageState extends State<LicensePage> { class _LicensePageState extends State<LicensePage> {
final ValueNotifier<int?> selectedId = ValueNotifier<int?>(null); final ValueNotifier<int?> selectedId = ValueNotifier<int?>(null);
@override
void dispose() {
selectedId.dispose();
super.dispose();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return _MasterDetailFlow( return _MasterDetailFlow(
...@@ -1321,6 +1327,12 @@ class _MasterDetailScaffoldState extends State<_MasterDetailScaffold> ...@@ -1321,6 +1327,12 @@ class _MasterDetailScaffoldState extends State<_MasterDetailScaffold>
floatingActionButtonLocation = FloatingActionButtonLocation.endTop; floatingActionButtonLocation = FloatingActionButtonLocation.endTop;
} }
@override
void dispose() {
_detailArguments.dispose();
super.dispose();
}
@override @override
void openDetailPage(Object arguments) { void openDetailPage(Object arguments) {
SchedulerBinding.instance.addPostFrameCallback((_) => _detailArguments.value = arguments); SchedulerBinding.instance.addPostFrameCallback((_) => _detailArguments.value = arguments);
......
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