submit static method

dynamic submit(
  1. String name, {
  2. required dynamic onSuccess(
    1. dynamic value
    ),
  3. dynamic onFailure(
    1. Exception exception
    )?,
  4. bool showToastError = true,
})

Submit the form

Implementation

static submit(String name,
    {required Function(dynamic value) onSuccess,
    Function(Exception exception)? onFailure,
    bool showToastError = true}) {
  /// Update the state
  updateState("form_" + name, data: {
    "onSuccess": onSuccess,
    "onFailure": onFailure,
    "showToastError": showToastError
  });
}