Comprehensive Technical Blueprint & Implementation Strategy
Flutter (Dart) - Cross-platform, single codebase for iOS & Android. High performance.
Riverpod / GetX - For reactive UI updates (live step count, alarm triggers).
Hive (NoSQL) - Fast, offline storage for complex objects like voice templates and activity logs.
To ensure alarms work even when the app is closed:
flutter_background_service + WorkManager to keep a Dart isolate running.UNUserNotificationCenter for reliability.Using Hive boxes or SQLite tables for offline data.
{
"id": "user_001",
"name": "User",
"selected_voice_gender": "male", // or "female"
"selected_language": "ur-PK", // or "hi-IN", "en-US"
"sos_contact_number": "+92xxx"
}
Table: reminders - reminder_id: UUID - title: String (e.g., "Medicine Time") - custom_text: String (e.g., "Ground janey ka waqt ho gaya") - scheduled_time: TimeStamp - repeat_interval: ENUM (DAILY, WEEKDAYS) - category: ENUM (MEDICINE, TASK, HYDRATION) - is_active: Boolean - snooze_duration_minutes: Integer
Table: activity_logs - log_id: UUID - type: ENUM (STEP, RUN) - start_time: Timestamp - count_steps: Integer - distance_km: Float - route_points: JSON (lat/long array)
FuturespeakAlarm(Reminder reminder, UserProfile user) async { final tts = FlutterTts(); // 1. Set Language await tts.setLanguage(user.languageCode); // e.g., "ur-PK" // 2. Set Gender Pitch if (user.voiceGender == 'female') { await tts.setPitch(1.2); } else { await tts.setPitch(0.9); } // 3. Volume Max await tts.setVolume(1.0); // 4. Speak or SOS Loop if (reminder.category == 'SOS') { for(int i=0; i<5; i++) { await tts.speak("HELP! " + reminder.custom_text); await Future.delayed(Duration(seconds: 3)); } } else { await tts.speak(reminder.custom_text); } }
Design Philosophy: Minimalist, Senior-Friendly, High-Contrast.
Setup Flutter, Hive DB, Basic TTS ("Hello").
Reminder Scheduler + Background Notifications.
Pedometer & GPS Integration.
UI Styling, SOS Logic, Voice Switching.