From 50ad945c170d9022b581610a01fd10bd3a1a75e8 Mon Sep 17 00:00:00 2001 From: Caleb Jasik Date: Thu, 13 Feb 2025 11:22:57 -0600 Subject: [PATCH] `dart fix --apply --code=curly_braces_in_flow_control_structures` --- lib/components/IPFormField.dart | 3 ++- lib/components/PlatformTextFormField.dart | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/components/IPFormField.dart b/lib/components/IPFormField.dart index 80ff14a..6d6ab64 100644 --- a/lib/components/IPFormField.dart +++ b/lib/components/IPFormField.dart @@ -106,8 +106,9 @@ class _IPFormField extends FormFieldState { oldWidget.controller?.removeListener(_handleControllerChanged); widget.controller?.addListener(_handleControllerChanged); - if (oldWidget.controller != null && widget.controller == null) + if (oldWidget.controller != null && widget.controller == null) { _controller = TextEditingController.fromValue(oldWidget.controller!.value); + } if (widget.controller != null) { setValue(widget.controller!.text); if (oldWidget.controller == null) _controller = null; diff --git a/lib/components/PlatformTextFormField.dart b/lib/components/PlatformTextFormField.dart index 026ed25..72d09d2 100644 --- a/lib/components/PlatformTextFormField.dart +++ b/lib/components/PlatformTextFormField.dart @@ -115,8 +115,9 @@ class _PlatformTextFormFieldState extends FormFieldState { oldWidget.controller?.removeListener(_handleControllerChanged); widget.controller?.addListener(_handleControllerChanged); - if (oldWidget.controller != null && widget.controller == null) + if (oldWidget.controller != null && widget.controller == null) { _controller = TextEditingController.fromValue(oldWidget.controller!.value); + } if (widget.controller != null) { setValue(widget.controller!.text); if (oldWidget.controller == null) _controller = null;