fetchById method
(Optional) Fetches a submission by its ID under a form.
Useful for edit/view workflows.
Implementation
Future<SubmissionModel> fetchById(String formPath, String submissionId) async {
try {
final url = ApiEndpoints.getSubmissionById(formPath, submissionId);
final response = await client.dio.get(url);
return SubmissionModel.fromJson(response.data ?? {});
} catch (e) {
throw SubmissionException('Failed to fetch submission: $e');
}
}