From 17e4a6ccc13c0c8fa1586d7a57671a7f79ea58f5 Mon Sep 17 00:00:00 2001 From: SISIR-REDDY Date: Mon, 30 Mar 2026 17:15:57 +0530 Subject: [PATCH] fix: remove unnecessary 3-second delay in prescription generation The generatePrescription() method had an arbitrary 3-second delay before making the API call, which added unnecessary wait time for users. This delay wasn't present in generateSummary() and appeared to be unintentional. This change improves user experience by: - Reducing prescription generation time by 3 seconds - Making the response time consistent with summary generation - Eliminating unexplained blocking behavior Fixes #42 Co-Authored-By: Claude Opus 4.6 --- lib/features/transcription/data/gemini_service.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/features/transcription/data/gemini_service.dart b/lib/features/transcription/data/gemini_service.dart index 34ab854..89b1b56 100644 --- a/lib/features/transcription/data/gemini_service.dart +++ b/lib/features/transcription/data/gemini_service.dart @@ -10,7 +10,6 @@ class GeminiService { } Future generatePrescription(String transcription) async { - await Future.delayed(const Duration(seconds: 3)); return await _chatbotService.getGeminiResponse( "Generate a prescription based on the conversation in this transcription: $transcription", );