From acf5ffb9312e614de2aef45a83be867f52a704ea Mon Sep 17 00:00:00 2001 From: "Michael W. Aziz" Date: Sun, 23 Mar 2025 16:06:59 +0200 Subject: [PATCH] [0.1.2] --- lib/src/form/src/controller.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/form/src/controller.dart b/lib/src/form/src/controller.dart index c926557..7c524f8 100644 --- a/lib/src/form/src/controller.dart +++ b/lib/src/form/src/controller.dart @@ -97,10 +97,10 @@ class AstromicFormController extends FormController { /// Get the value of a hosted state variable using it's ID. T? getValue(String id) { if (_hostedValues.keys.toList().contains(id)) { - if (_hostedValues[id] is (T?, bool)) { + if (_hostedValues[id]?.$1 is T?) { return _hostedValues[id]?.$1; } else { - throw FlutterError('Value found but is not of the type $T'); + throw FlutterError('Value found but is not of the type $T, it\'s of type ${_hostedValues[id]?.$1.runtimeType}'); } } else { return null;