submitStepData method
Submit the current step data to the backend API.
Implementation
Future<Map<String, dynamic>> submitStepData({
required String stepName,
required Map<String, dynamic> data,
}) async {
_loading = true;
notifyListeners();
try {
final response = await _apiService.submitStep(
stepName: stepName,
data: data,
);
_loading = false;
notifyListeners();
return response;
} catch (e) {
_loading = false;
notifyListeners();
rethrow;
}
}