clear method
Clear the form
Implementation
clear({bool refreshState = true}) {
_data.forEach((key, value) {
_data[key] = null;
});
_dummyData.forEach((key, value) {
_dummyData[key] = null;
});
if (refreshState) {
// update the state
NyForm.stateClearData(stateName);
}
}