From 7d840d86f1dff273817a0af01dc44ed288cf57ed Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Tue, 20 Aug 2024 13:49:49 -0700 Subject: [PATCH] reset `TextEditingController` to prevent use after disposal --- lib/shared/json_schema_form.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/shared/json_schema_form.dart b/lib/shared/json_schema_form.dart index 48957d1..2f6cfb7 100644 --- a/lib/shared/json_schema_form.dart +++ b/lib/shared/json_schema_form.dart @@ -46,6 +46,8 @@ class JsonSchemaForm extends HookWidget { useEffect( () { + formState.value = {}; + if (properties != null) { properties.forEach((key, value) { final valueMap = value as Map;