From 60e80193c27071d68175698c525e58564b220b19 Mon Sep 17 00:00:00 2001 From: Joan Pablo Date: Fri, 29 Mar 2024 15:17:19 -0400 Subject: [PATCH] Update Flutter dependencies - Dispose inner TextEditingController --- lib/src/widgets/reactive_text_field.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/widgets/reactive_text_field.dart b/lib/src/widgets/reactive_text_field.dart index 08f4989..40cda1b 100644 --- a/lib/src/widgets/reactive_text_field.dart +++ b/lib/src/widgets/reactive_text_field.dart @@ -295,7 +295,8 @@ class _ReactiveTextFieldState @override void dispose() { - if (widget.textController == null) { + final currentWidget = widget as ReactiveTextField; + if (currentWidget._textController == null) { _textController.dispose(); } super.dispose();