loadForm method
Loads the form
If resetData
is true
it will call setState with _formData
= null
Useful if a manual reload of the form is required
Implementation
void loadForm({bool resetData = false}) {
if (resetData) {
setState(() {
_formData = null;
_error = null;
});
}
_client.loadForm(uri: widget.uri).then((value) {
if (widget.onFormLoaded != null) {
widget.onFormLoaded!(value);
}
if (mounted) {
setState(() {
_formData = value;
_error = null;
});
}
}).catchError((error) {
_onError(error);
});
}