Skip to content

Commit

Permalink
Dispose only if text controller is created internally
Browse files Browse the repository at this point in the history
  • Loading branch information
vicenterusso committed Mar 23, 2024
1 parent 0fc9ffc commit 51b3162
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/src/widgets/reactive_text_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,9 @@ class _ReactiveTextFieldState<T>

@override
void dispose() {
_textController.dispose();
if (widget.textController == null) {
_textController.dispose();
}
super.dispose();
}
}

0 comments on commit 51b3162

Please sign in to comment.