[0.1.2]
This commit is contained in:
@@ -97,10 +97,10 @@ class AstromicFormController extends FormController {
|
||||
/// Get the value of a hosted state variable using it's ID.
|
||||
T? getValue<T>(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;
|
||||
|
||||
Reference in New Issue
Block a user