File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -179,6 +179,9 @@ class _HomeScreenState extends State<HomeScreen> {
179179 dismissDirection: DismissDirection .horizontal,
180180 ),
181181 );
182+ } finally {
183+ linkIdController.clear ();
184+ shortCodeController.clear ();
182185 }
183186 },
184187 child: Container (
@@ -244,6 +247,13 @@ class _HomeScreenState extends State<HomeScreen> {
244247 );
245248 }
246249
250+ @override
251+ void dispose () {
252+ linkIdController.dispose ();
253+ shortCodeController.dispose (); // Dispose of the controller when done
254+ super .dispose ();
255+ }
256+
247257 Widget searchBox () {
248258 return Container (
249259 height: 65 ,
@@ -264,13 +274,6 @@ class _HomeScreenState extends State<HomeScreen> {
264274 );
265275 }
266276
267- @override
268- void dispose () {
269- linkIdController.dispose ();
270- shortCodeController.dispose (); // Dispose of the controller when done
271- super .dispose ();
272- }
273-
274277 AppBar _buildAppBar () {
275278 return AppBar (
276279 elevation: 0 ,
You can’t perform that action at this time.
0 commit comments