preRun method
An initial run of validations upon starting a run. E.g.: form validation.
Implementation
@protected
Future<bool> preRun(BuildContext context, Map actionProps) async {
try {
final form =
LowderScreen.of(context)?.formKey.currentState ?? Form.of(context);
form.save();
if (parseBool(actionProps["validateForm"]) && !form.validate()) {
return false;
}
} catch (e) {
// log("[$runtimeType] Form not found.");
}
return true;
}