fix: dispose TextEditingControllers in settings dialogs

This commit is contained in:
edde746
2026-04-06 16:43:04 +02:00
parent b3cf4ebf12
commit 010ace58fa
3 changed files with 10 additions and 3 deletions
+1 -1
View File
@@ -397,7 +397,7 @@ class _MainAppState extends State<MainApp> with WidgetsBindingObserver {
case AppLifecycleState.paused:
case AppLifecycleState.detached:
if (Platform.isAndroid || Platform.isIOS) {
_appDatabase.close();
unawaited(_appDatabase.close());
}
InAppReviewService.instance.endSession();
if (Platform.isWindows || Platform.isMacOS || Platform.isLinux) {
+4 -1
View File
@@ -578,7 +578,10 @@ class _SettingsScreenState extends State<SettingsScreen> with FocusableTab {
],
);
},
).then((_) => saveFocusNode.dispose());
).then((_) {
controller.dispose();
saveFocusNode.dispose();
});
}
void _showClearCacheDialog() {
+5 -1
View File
@@ -220,6 +220,7 @@ void _showNumericInputDialogStandard({
);
},
).then((_) {
controller.dispose();
saveFocusNode.dispose();
});
}
@@ -286,5 +287,8 @@ void showTextInputDialog({
},
);
},
).then((_) => saveFocusNode.dispose());
).then((_) {
controller.dispose();
saveFocusNode.dispose();
});
}