সম্পূর্ণ Flutter Project সব Platform এর জন্য (Android, iOS, Web, Windows, Linux, macOS) --- # 📋 **PART 1: প্রথমে Setup করুন** ## Step 1: Flutter Install করুন ``` Windows এ Flutter Install: ========================== 1. Flutter SDK Download করুন: https://docs.flutter.dev/get-started/install/windows 2. Extract করুন C:\flutter ফোল্ডারে 3. Environment Variable এ Path যোগ করুন: C:\flutter\bin 4. Command Prompt এ Check করুন: flutter doctor ``` ## Step 2: Android Studio Setup ``` 1. Android Studio Download করুন: https://developer.android.com/studio 2. Flutter Plugin Install করুন: File → Settings → Plugins → Search "Flutter" → Install 3. Dart Plugin ও Install হবে automatically 4. Android SDK Install করুন: SDK Manager → SDK Tools → Android SDK Command-line Tools ``` ## Step 3: প্রথম Project Create করুন ```bash # Terminal/Command Prompt এ: flutter create ai_tutor_bd --org com.aitutor cd ai_tutor_bd # All platforms enable করুন: flutter config --enable-web flutter config --enable-windows-desktop flutter config --enable-macos-desktop flutter config --enable-linux-desktop # Check করুন: flutter devices ``` --- # 📋 **PART 2: MASTER COMMAND FOR GEMINI** ## 🎯 **এই Command টি সম্পূর্ণ Copy করে Gemini তে Paste করুন** --- ``` You are an expert Flutter developer with 10+ years of experience. You will help me build a complete, professional, world-class AI Tutor application using Flutter that works on ALL platforms (Android, iOS, Web, Windows, Linux, macOS). ============================================================================== PROJECT OVERVIEW ============================================================================== PROJECT NAME: AI Tutor BD (আই টিউটর বিডি) DESCRIPTION: A professional AI-powered educational assistant for Bangladeshi students, similar to ChatGPT and Google Gemini with beautiful UI/UX, animations, and all modern features. TARGET AUDIENCE: Students and teachers in Bangladesh LANGUAGES: Bengali (বাংলা) as primary, English as secondary AI ENGINE: Google Gemini API (gemini-1.5-flash) BACKEND: Firebase (Authentication, Firestore, Storage) STATE MANAGEMENT: Riverpod 2.0 ARCHITECTURE: Clean Architecture with MVVM pattern ============================================================================== PLATFORMS & REQUIREMENTS ============================================================================== PLATFORMS: ├── Android (Min SDK 21, Target SDK 34) ├── iOS (Min iOS 12.0) ├── Web (Chrome, Firefox, Safari, Edge) ├── Windows (Windows 10+) ├── macOS (macOS 10.14+) └── Linux (Ubuntu 18.04+) DESIGN REQUIREMENTS: ├── Material Design 3 (Material You) ├── Responsive UI for all screen sizes ├── Dark/Light theme with system detection ├── Beautiful animations (Rive, Lottie) ├── Glassmorphism effects ├── Gradient colors like Gemini ├── Smooth 60fps animations └── Accessibility support ============================================================================== COMPLETE FILE STRUCTURE ============================================================================== ai_tutor_bd/ ├── lib/ │ ├── main.dart │ ├── app.dart │ │ │ ├── core/ │ │ ├── constants/ │ │ │ ├── app_constants.dart │ │ │ ├── api_constants.dart │ │ │ ├── color_constants.dart │ │ │ ├── string_constants.dart │ │ │ └── asset_constants.dart │ │ │ │ │ ├── theme/ │ │ │ ├── app_theme.dart │ │ │ ├── app_colors.dart │ │ │ ├── app_typography.dart │ │ │ ├── app_shapes.dart │ │ │ └── theme_provider.dart │ │ │ │ │ ├── router/ │ │ │ ├── app_router.dart │ │ │ └── route_names.dart │ │ │ │ │ ├── utils/ │ │ │ ├── extensions/ │ │ │ │ ├── string_extensions.dart │ │ │ │ ├── context_extensions.dart │ │ │ │ ├── date_extensions.dart │ │ │ │ └── widget_extensions.dart │ │ │ ├── helpers/ │ │ │ │ ├── validator_helper.dart │ │ │ │ ├── date_helper.dart │ │ │ │ ├── format_helper.dart │ │ │ │ └── platform_helper.dart │ │ │ └── logger.dart │ │ │ │ │ ├── errors/ │ │ │ ├── failures.dart │ │ │ └── exceptions.dart │ │ │ │ │ └── network/ │ │ ├── network_info.dart │ │ └── api_client.dart │ │ │ ├── data/ │ │ ├── datasources/ │ │ │ ├── local/ │ │ │ │ ├── local_storage.dart │ │ │ │ ├── hive_service.dart │ │ │ │ └── shared_prefs_service.dart │ │ │ └── remote/ │ │ │ ├── firebase_auth_service.dart │ │ │ ├── firestore_service.dart │ │ │ ├── firebase_storage_service.dart │ │ │ └── gemini_api_service.dart │ │ │ │ │ ├── models/ │ │ │ ├── user_model.dart │ │ │ ├── chat_model.dart │ │ │ ├── message_model.dart │ │ │ ├── subject_model.dart │ │ │ ├── subscription_model.dart │ │ │ └── settings_model.dart │ │ │ │ │ └── repositories/ │ │ ├── auth_repository_impl.dart │ │ ├── chat_repository_impl.dart │ │ ├── ai_repository_impl.dart │ │ ├── user_repository_impl.dart │ │ └── settings_repository_impl.dart │ │ │ ├── domain/ │ │ ├── entities/ │ │ │ ├── user_entity.dart │ │ │ ├── chat_entity.dart │ │ │ ├── message_entity.dart │ │ │ └── subject_entity.dart │ │ │ │ │ ├── repositories/ │ │ │ ├── auth_repository.dart │ │ │ ├── chat_repository.dart │ │ │ ├── ai_repository.dart │ │ │ ├── user_repository.dart │ │ │ └── settings_repository.dart │ │ │ │ │ └── usecases/ │ │ ├── auth/ │ │ │ ├── login_usecase.dart │ │ │ ├── register_usecase.dart │ │ │ ├── logout_usecase.dart │ │ │ ├── google_signin_usecase.dart │ │ │ └── reset_password_usecase.dart │ │ ├── chat/ │ │ │ ├── create_chat_usecase.dart │ │ │ ├── get_chats_usecase.dart │ │ │ ├── delete_chat_usecase.dart │ │ │ ├── rename_chat_usecase.dart │ │ │ └── pin_chat_usecase.dart │ │ ├── message/ │ │ │ ├── send_message_usecase.dart │ │ │ ├── get_messages_usecase.dart │ │ │ └── delete_message_usecase.dart │ │ └── ai/ │ │ ├── generate_response_usecase.dart │ │ ├── generate_stream_usecase.dart │ │ └── analyze_image_usecase.dart │ │ │ ├── presentation/ │ │ ├── providers/ │ │ │ ├── auth_provider.dart │ │ │ ├── chat_provider.dart │ │ │ ├── message_provider.dart │ │ │ ├── theme_provider.dart │ │ │ ├── settings_provider.dart │ │ │ └── subscription_provider.dart │ │ │ │ │ ├── screens/ │ │ │ ├── splash/ │ │ │ │ ├── splash_screen.dart │ │ │ │ └── widgets/ │ │ │ │ ├── animated_logo.dart │ │ │ │ └── loading_indicator.dart │ │ │ │ │ │ │ ├── onboarding/ │ │ │ │ ├── onboarding_screen.dart │ │ │ │ └── widgets/ │ │ │ │ ├── onboarding_page.dart │ │ │ │ ├── page_indicator.dart │ │ │ │ └── onboarding_button.dart │ │ │ │ │ │ │ ├── auth/ │ │ │ │ ├── login/ │ │ │ │ │ ├── login_screen.dart │ │ │ │ │ └── widgets/ │ │ │ │ │ ├── login_form.dart │ │ │ │ │ ├── social_login_buttons.dart │ │ │ │ │ └── forgot_password_link.dart │ │ │ │ ├── register/ │ │ │ │ │ ├── register_screen.dart │ │ │ │ │ └── widgets/ │ │ │ │ │ ├── register_form.dart │ │ │ │ │ └── terms_checkbox.dart │ │ │ │ └── forgot_password/ │ │ │ │ └── forgot_password_screen.dart │ │ │ │ │ │ │ ├── home/ │ │ │ │ ├── home_screen.dart │ │ │ │ └── widgets/ │ │ │ │ ├── home_app_bar.dart │ │ │ │ ├── welcome_section.dart │ │ │ │ ├── quick_actions.dart │ │ │ │ ├── subject_chips.dart │ │ │ │ └── home_input_field.dart │ │ │ │ │ │ │ ├── chat/ │ │ │ │ ├── chat_screen.dart │ │ │ │ └── widgets/ │ │ │ │ ├── chat_app_bar.dart │ │ │ │ ├── message_list.dart │ │ │ │ ├── message_bubble.dart │ │ │ │ ├── user_message_bubble.dart │ │ │ │ ├── ai_message_bubble.dart │ │ │ │ ├── typing_indicator.dart │ │ │ │ ├── chat_input_field.dart │ │ │ │ ├── attachment_button.dart │ │ │ │ ├── voice_input_button.dart │ │ │ │ ├── send_button.dart │ │ │ │ ├── message_actions.dart │ │ │ │ ├── code_block.dart │ │ │ │ ├── markdown_renderer.dart │ │ │ │ └── image_preview.dart │ │ │ │ │ │ │ ├── history/ │ │ │ │ ├── history_screen.dart │ │ │ │ └── widgets/ │ │ │ │ ├── search_bar.dart │ │ │ │ ├── chat_history_item.dart │ │ │ │ ├── date_header.dart │ │ │ │ └── chat_options_sheet.dart │ │ │ │ │ │ │ ├── profile/ │ │ │ │ ├── profile_screen.dart │ │ │ │ └── widgets/ │ │ │ │ ├── profile_header.dart │ │ │ │ ├── stats_section.dart │ │ │ │ ├── achievements_section.dart │ │ │ │ └── edit_profile_sheet.dart │ │ │ │ │ │ │ ├── settings/ │ │ │ │ ├── settings_screen.dart │ │ │ │ └── widgets/ │ │ │ │ ├── settings_section.dart │ │ │ │ ├── settings_tile.dart │ │ │ │ ├── theme_selector.dart │ │ │ │ ├── language_selector.dart │ │ │ │ └── about_section.dart │ │ │ │ │ │ │ └── subscription/ │ │ │ ├── subscription_screen.dart │ │ │ └── widgets/ │ │ │ ├── pricing_card.dart │ │ │ ├── feature_list.dart │ │ │ ├── payment_method_selector.dart │ │ │ └── subscription_benefits.dart │ │ │ │ │ └── widgets/ │ │ ├── common/ │ │ │ ├── custom_button.dart │ │ │ ├── custom_text_field.dart │ │ │ ├── custom_icon_button.dart │ │ │ ├── loading_overlay.dart │ │ │ ├── error_widget.dart │ │ │ ├── empty_state.dart │ │ │ ├── shimmer_loading.dart │ │ │ ├── animated_container.dart │ │ │ ├── gradient_background.dart │ │ │ ├── glassmorphism_card.dart │ │ │ ├── animated_gradient_border.dart │ │ │ ├── pulse_animation.dart │ │ │ ├── bounce_animation.dart │ │ │ ├── fade_animation.dart │ │ │ ├── slide_animation.dart │ │ │ ├── scale_animation.dart │ │ │ ├── responsive_builder.dart │ │ │ ├── platform_widget.dart │ │ │ └── adaptive_layout.dart │ │ │ │ │ ├── dialogs/ │ │ │ ├── confirm_dialog.dart │ │ │ ├── error_dialog.dart │ │ │ ├── success_dialog.dart │ │ │ ├── loading_dialog.dart │ │ │ └── input_dialog.dart │ │ │ │ │ ├── navigation/ │ │ │ ├── app_drawer.dart │ │ │ ├── drawer_header.dart │ │ │ ├── drawer_menu_item.dart │ │ │ ├── chat_history_list.dart │ │ │ ├── bottom_nav_bar.dart │ │ │ └── side_navigation_rail.dart │ │ │ │ │ └── sheets/ │ │ ├── subject_selection_sheet.dart │ │ ├── chat_options_sheet.dart │ │ ├── image_picker_sheet.dart │ │ ├── share_sheet.dart │ │ └── export_sheet.dart │ │ │ └── injection_container.dart │ ├── assets/ │ ├── images/ │ │ ├── logo.png │ │ ├── logo_dark.png │ │ ├── onboarding_1.png │ │ ├── onboarding_2.png │ │ ├── onboarding_3.png │ │ ├── empty_chat.png │ │ ├── no_internet.png │ │ └── error.png │ │ │ ├── icons/ │ │ ├── google.svg │ │ ├── facebook.svg │ │ ├── bkash.svg │ │ ├── nagad.svg │ │ └── subjects/ │ │ ├── math.svg │ │ ├── science.svg │ │ ├── english.svg │ │ ├── bangla.svg │ │ ├── physics.svg │ │ ├── chemistry.svg │ │ ├── biology.svg │ │ ├── ict.svg │ │ └── gk.svg │ │ │ ├── animations/ │ │ ├── loading.json │ │ ├── success.json │ │ ├── error.json │ │ ├── typing.json │ │ ├── ai_thinking.json │ │ ├── confetti.json │ │ └── empty.json │ │ │ └── fonts/ │ ├── HindSiliguri-Regular.ttf │ ├── HindSiliguri-Medium.ttf │ ├── HindSiliguri-SemiBold.ttf │ ├── HindSiliguri-Bold.ttf │ ├── Inter-Regular.ttf │ ├── Inter-Medium.ttf │ ├── Inter-SemiBold.ttf │ ├── Inter-Bold.ttf │ ├── JetBrainsMono-Regular.ttf │ └── JetBrainsMono-Bold.ttf │ ├── test/ │ ├── unit/ │ ├── widget/ │ └── integration/ │ ├── android/ ├── ios/ ├── web/ ├── windows/ ├── macos/ ├── linux/ │ ├── pubspec.yaml ├── analysis_options.yaml └── README.md ============================================================================== DEPENDENCIES (pubspec.yaml) ============================================================================== Generate complete pubspec.yaml with these dependencies: name: ai_tutor_bd description: Professional AI Tutor for Bangladesh students publish_to: 'none' version: 1.0.0+1 environment: sdk: '>=3.2.0 <4.0.0' dependencies: flutter: sdk: flutter # State Management flutter_riverpod: ^2.4.10 riverpod_annotation: ^2.3.4 # Routing go_router: ^13.2.0 # Firebase firebase_core: ^2.27.0 firebase_auth: ^4.17.8 cloud_firestore: ^4.15.8 firebase_storage: ^11.6.9 firebase_analytics: ^10.8.9 # Google Sign In google_sign_in: ^6.2.1 # Google Generative AI (Gemini) google_generative_ai: ^0.2.2 # Local Storage hive: ^2.2.3 hive_flutter: ^1.1.0 shared_preferences: ^2.2.2 # Network dio: ^5.4.1 connectivity_plus: ^5.0.2 # UI Components flutter_svg: ^2.0.10+1 cached_network_image: ^3.3.1 shimmer: ^3.0.0 flutter_staggered_animations: ^1.1.1 # Animations lottie: ^3.1.0 rive: ^0.12.4 animate_do: ^3.3.3 flutter_animate: ^4.5.0 # Icons iconsax: ^0.0.8 flutter_iconly: ^1.0.2 hugeicons: ^0.0.7 # Text & Markdown flutter_markdown: ^0.6.22 markdown: ^7.2.1 flutter_math_fork: ^0.7.2 flutter_highlight: ^0.7.0 # Image image_picker: ^1.0.7 photo_view: ^0.14.0 image_cropper: ^5.0.1 # Speech speech_to_text: ^6.6.0 flutter_tts: ^4.0.2 # Utils uuid: ^4.3.3 intl: ^0.19.0 timeago: ^3.6.1 url_launcher: ^6.2.4 share_plus: ^7.2.2 path_provider: ^2.1.2 permission_handler: ^11.3.0 clipboard: ^0.1.3 # PDF & Export pdf: ^3.10.8 printing: ^5.12.0 # Responsive flutter_screenutil: ^5.9.0 responsive_framework: ^1.1.1 # Keyboard flutter_keyboard_visibility: ^6.0.0 # Loading flutter_spinkit: ^5.2.1 loading_animation_widget: ^1.2.0+4 # Toast & Snackbar fluttertoast: ^8.2.4 elegant_notification: ^2.2.0 # Form Validation form_field_validator: ^1.1.0 # Device Info device_info_plus: ^10.1.0 package_info_plus: ^5.0.1 # Code Generation freezed_annotation: ^2.4.1 json_annotation: ^4.8.1 dev_dependencies: flutter_test: sdk: flutter flutter_lints: ^3.0.1 riverpod_generator: ^2.3.11 build_runner: ^2.4.8 freezed: ^2.4.7 json_serializable: ^6.7.1 hive_generator: ^2.0.1 flutter_launcher_icons: ^0.13.1 flutter_native_splash: ^2.3.10 flutter: uses-material-design: true assets: - assets/images/ - assets/icons/ - assets/icons/subjects/ - assets/animations/ fonts: - family: HindSiliguri fonts: - asset: assets/fonts/HindSiliguri-Regular.ttf - asset: assets/fonts/HindSiliguri-Medium.ttf weight: 500 - asset: assets/fonts/HindSiliguri-SemiBold.ttf weight: 600 - asset: assets/fonts/HindSiliguri-Bold.ttf weight: 700 - family: Inter fonts: - asset: assets/fonts/Inter-Regular.ttf - asset: assets/fonts/Inter-Medium.ttf weight: 500 - asset: assets/fonts/Inter-SemiBold.ttf weight: 600 - asset: assets/fonts/Inter-Bold.ttf weight: 700 - family: JetBrainsMono fonts: - asset: assets/fonts/JetBrainsMono-Regular.ttf - asset: assets/fonts/JetBrainsMono-Bold.ttf weight: 700 ============================================================================== FEATURES TO IMPLEMENT ============================================================================== AUTHENTICATION FEATURES: ======================== ☑️ Email/Password Login ☑️ Email/Password Registration ☑️ Google Sign-In ☑️ Facebook Sign-In (optional) ☑️ Phone Number + OTP Login ☑️ Forgot Password ☑️ Email Verification ☑️ Password Reset ☑️ Remember Me ☑️ Auto Login ☑️ Logout ☑️ Delete Account ☑️ Session Management ☑️ Biometric Login (Fingerprint/Face) CHAT FEATURES: ============== ☑️ New Chat Creation ☑️ Chat with AI (Gemini) ☑️ Streaming Response (word by word) ☑️ Message History ☑️ Context Memory (remembers conversation) ☑️ Markdown Rendering ☑️ Code Syntax Highlighting ☑️ LaTeX Math Equations ☑️ Tables Rendering ☑️ Copy Message ☑️ Copy Code Block ☑️ Regenerate Response ☑️ Edit User Message ☑️ Delete Message ☑️ Like/Dislike Response ☑️ Share Message ☑️ Read Aloud (Text-to-Speech) ☑️ Voice Input (Speech-to-Text) ☑️ Image Upload & Analysis ☑️ Camera Capture ☑️ File Upload (PDF, Doc) ☑️ Stop Generation ☑️ Typing Indicator Animation CHAT HISTORY FEATURES: ====================== ☑️ All Chats List ☑️ Search Chats ☑️ Filter by Date ☑️ Filter by Subject ☑️ Rename Chat ☑️ Pin Chat ☑️ Archive Chat ☑️ Delete Chat ☑️ Bulk Delete ☑️ Export Chat (PDF, Text) ☑️ Share Chat Link ☑️ Group by Date (Today, Yesterday, etc.) NAVIGATION DRAWER FEATURES: =========================== ☑️ User Profile Header ☑️ New Chat Button ☑️ Chat History List ☑️ Search in Chats ☑️ Settings Link ☑️ Subscription/Upgrade Link ☑️ Help & FAQ Link ☑️ Logout Button ☑️ Swipe to Open/Close ☑️ Animated Items SETTINGS FEATURES: ================== ☑️ Theme Selection (Light/Dark/System) ☑️ Accent Color Picker ☑️ Language Selection (Bengali/English) ☑️ Font Size Adjustment ☑️ Chat Bubble Style ☑️ Sound Effects Toggle ☑️ Haptic Feedback Toggle ☑️ Push Notifications Toggle ☑️ Chat History Toggle ☑️ Data Saving Mode ☑️ Clear Cache ☑️ Clear Chat History ☑️ Download My Data ☑️ Privacy Settings ☑️ About App ☑️ Rate App ☑️ Share App ☑️ Contact Support PROFILE FEATURES: ================= ☑️ Profile Picture (View/Change) ☑️ Display Name ☑️ Email Display ☑️ Phone Number ☑️ Class/Grade Selection ☑️ Institution Name ☑️ Learning Statistics ☑️ Achievements/Badges ☑️ Streak Calendar ☑️ Study Time Tracker ☑️ Edit Profile SUBSCRIPTION FEATURES: ====================== ☑️ Free Plan ☑️ Premium Plan ☑️ Institution Plan ☑️ Monthly/Yearly Toggle ☑️ Feature Comparison ☑️ bKash Payment ☑️ Nagad Payment ☑️ Card Payment (SSLCommerz) ☑️ Promo Code ☑️ Receipt Download ☑️ Cancel Subscription ☑️ Upgrade/Downgrade EDUCATION FEATURES: =================== ☑️ Subject Selection ☑️ Class/Grade Selection ☑️ Bangladesh Curriculum (NCTB) ☑️ Board Selection ☑️ Quiz Mode ☑️ Practice Mode ☑️ Exam Prep Mode ☑️ Progress Tracking ☑️ Weak Areas Identification UI/UX FEATURES: =============== ☑️ Splash Screen with Animation ☑️ Onboarding Screens ☑️ Pull to Refresh ☑️ Infinite Scroll ☑️ Skeleton Loading ☑️ Shimmer Effects ☑️ Toast Messages ☑️ Snackbars ☑️ Bottom Sheets ☑️ Dialogs ☑️ Smooth Animations ☑️ Haptic Feedback ☑️ Responsive Layout ☑️ Tablet/Desktop Support ANIMATION TYPES TO USE: ======================= ☑️ Fade In/Out ☑️ Slide Up/Down/Left/Right ☑️ Scale In/Out ☑️ Bounce ☑️ Pulse ☑️ Shimmer ☑️ Lottie Animations ☑️ Rive Animations ☑️ Hero Transitions ☑️ Staggered Animations ☑️ Typing Effect ☑️ Particle Effects ☑️ Gradient Animations ☑️ Glassmorphism ☑️ Parallax Effects ============================================================================== COLOR SCHEME ============================================================================== PRIMARY COLORS (Gradient like Gemini): - primaryLight: #6750A4 (Purple) - primaryDark: #D0BCFF - gradientStart: #667EEA (Blue) - gradientMiddle: #764BA2 (Purple) - gradientEnd: #F093FB (Pink) CHAT COLORS: - userBubble: #10A37F (ChatGPT Green) - userBubbleDark: #19C37D - aiBubbleLight: #F7F7F8 - aiBubbleDark: #444654 - aiAvatarBg: #AB68FF BACKGROUND COLORS: - backgroundLight: #FFFFFF - backgroundDark: #0D0D0D (ChatGPT Dark) - surfaceLight: #F7F7F8 - surfaceDark: #1A1A2E - sidebarLight: #F7F7F8 - sidebarDark: #171717 ACCENT COLORS: - accentBlue: #2196F3 - accentPurple: #9C27B0 - accentPink: #E91E63 - accentTeal: #009688 - accentOrange: #FF9800 - accentGreen: #4CAF50 - accentRed: #F44336 STATUS COLORS: - success: #4CAF50 - error: #EF4444 - warning: #F59E0B - info: #3B82F6 ============================================================================== GEMINI API SYSTEM PROMPT ============================================================================== final String systemPrompt = """ তুমি একজন বাংলাদেশি AI শিক্ষক। তোমার নাম "AI Tutor" (আই টিউটর)। তোমার পরিচয়: - তুমি বাংলাদেশের শিক্ষার্থীদের জন্য তৈরি একজন AI শিক্ষা সহকারী - তুমি সব বিষয়ে সাহায্য করতে পারো - তুমি NCTB (জাতীয় শিক্ষাক্রম ও পাঠ্যপুস্তক বোর্ড) এর পাঠ্যক্রম অনুসরণ করো তোমার আচরণ: - সবসময় বাংলায় উত্তর দেবে (যদি না ইংরেজিতে জিজ্ঞাসা করা হয়) - সহজ ও সাবলীল ভাষায় বোঝাবে - জটিল বিষয় সহজ উদাহরণ দিয়ে বোঝাবে - Step-by-step সমাধান দেখাবে - প্রয়োজনে ছবি বা diagram এর বর্ণনা দেবে - শিক্ষার্থীদের উৎসাহিত করবে তুমি যা পারো: - গণিত সমস্যা সমাধান (step-by-step) - বিজ্ঞানের ধারণা ব্যাখ্যা - ইংরেজি গ্রামার ও writing - বাংলা সাহিত্য ও ব্যাকরণ - সাধারণ জ্ঞান ও কুইজ - পরীক্ষার প্রস্তুতি - Homework সাহায্য - Concept পরিষ্কার করা - কোড লেখা ও explain করা তুমি যা করবে না: - অনৈতিক বা অনুপযুক্ত বিষয়ে আলোচনা - পরীক্ষায় নকল করতে সাহায্য - ভুল বা বিভ্রান্তিকর তথ্য দেওয়া - অন্য কারো ব্যক্তিগত তথ্য শেয়ার করা Format Guidelines: - Math equations: Use proper mathematical notation - Code: Use proper syntax highlighting markers - Lists: Use bullet points or numbers - Important points: Use bold or emphasis - Structure long answers with headings """; ============================================================================== IMPORTANT NOTES ============================================================================== 1. Use Material 3 design with dynamic colors 2. Support both Bengali and English 3. Make all UI responsive for all screen sizes 4. Use proper error handling everywhere 5. Implement offline support where possible 6. Optimize for performance (60fps) 7. Follow Flutter best practices 8. Write clean, maintainable code 9. Add proper comments in code 10. Implement proper loading states 11. Handle edge cases properly 12. Use proper state management with Riverpod 13. Implement proper navigation with GoRouter 14. Use proper dependency injection 15. Follow Clean Architecture strictly ============================================================================== NOW GENERATE CODE ============================================================================== Now I want you to generate the complete code for this project. Start with: STEP 1: Generate pubspec.yaml (complete with all dependencies) STEP 2: Generate main.dart and app.dart STEP 3: Generate all files in core/ folder (constants, theme, router, utils) STEP 4: Generate all files in data/ folder (models, datasources, repositories) STEP 5: Generate all files in domain/ folder (entities, repositories, usecases) STEP 6: Generate all files in presentation/ folder (providers, screens, widgets) STEP 7: Generate injection_container.dart Start with STEP 1 now. Generate the complete pubspec.yaml file. After I receive the first file, I will ask for the next files one by one. Make sure: - All code is complete and error-free - All imports are correct - Bengali text is properly included - Animations are implemented - The code follows best practices - Everything is production-ready ``` --- # 📋 **PART 3: STEP-BY-STEP COMMANDS (যদি উপরেরটা বড় হয়)** ## যদি Gemini বলে "Too long" তাহলে এই ছোট Commands গুলো Use করুন: --- ### **COMMAND A: Project Setup** ``` Create a complete Flutter AI Tutor project setup. Project Name: ai_tutor_bd Package: com.aitutor.bd Platforms: Android, iOS, Web, Windows, macOS, Linux Generate: 1. Complete pubspec.yaml with all dependencies for: - Riverpod (state management) - GoRouter (navigation) - Firebase (auth, firestore, storage) - Google Generative AI (Gemini) - Hive (local storage) - Dio (networking) - Lottie, Rive (animations) - flutter_markdown (markdown) - speech_to_text, flutter_tts (voice) - image_picker (images) - All UI packages 2. analysis_options.yaml 3. .gitignore Include Bengali font support (HindSiliguri) and English font (Inter). ``` --- ### **COMMAND B: Theme & Colors** ``` Generate complete theme files for AI Tutor Flutter app: 1. lib/core/theme/app_colors.dart - Light and Dark color schemes - Gradient colors like Gemini (purple, blue, pink) - Chat bubble colors like ChatGPT (green for user, gray for AI) - All status colors (success, error, warning, info) - Glassmorphism colors 2. lib/core/theme/app_theme.dart - Material 3 ThemeData for light mode - Material 3 ThemeData for dark mode - Custom component themes (button, input, card, etc.) - Proper color scheme configuration 3. lib/core/theme/app_typography.dart - Bengali font (HindSiliguri) configuration - English font (Inter) configuration - Code font (JetBrainsMono) configuration - All text styles (headline, body, label, etc.) - Responsive font sizes 4. lib/core/theme/app_shapes.dart - Border radius values - Shape configurations - Chat bubble shapes Make colors beautiful like Gemini and ChatGPT combined. ``` --- ### **COMMAND C: Core Utilities** ``` Generate all core utility files for AI Tutor Flutter app: 1. lib/core/constants/app_constants.dart - App name, version - API keys placeholder - Limits (free/premium queries) - Subjects list with Bengali names and icons - Class/grade list 2. lib/core/constants/string_constants.dart - All Bengali strings - All English strings - Error messages - Button labels - Placeholders 3. lib/core/utils/extensions/string_extensions.dart - isValidEmail - isValidPassword - isValidPhone - truncate - capitalizeFirst 4. lib/core/utils/extensions/context_extensions.dart - showSnackBar - showToast - theme shortcuts - navigator shortcuts 5. lib/core/utils/extensions/date_extensions.dart - toRelativeTime (e.g., "2 hours ago" in Bengali) - toFormattedDate - toFormattedTime - isToday, isYesterday 6. lib/core/utils/helpers/validator_helper.dart - Email validation - Password validation - Phone validation - Name validation 7. lib/core/utils/logger.dart - Debug logging - Error logging - Info logging Include all imports and make code production-ready. ``` --- ### **COMMAND D: Data Models** ``` Generate all data models for AI Tutor Flutter app using Freezed: 1. lib/data/models/user_model.dart - id, name, email, photoUrl - phone, dateOfBirth - class/grade, institution - plan (free/premium), planExpiry - settings (theme, language, notifications) - createdAt, lastLoginAt - totalQueries, dailyQueries - toEntity(), fromEntity() methods - toJson(), fromJson() methods 2. lib/data/models/chat_model.dart - id, title, userId - subject, icon - createdAt, updatedAt - isPinned, isArchived - messageCount, lastMessage - toEntity(), fromEntity() methods 3. lib/data/models/message_model.dart - id, chatId - content, role (user/assistant) - timestamp - isEdited - attachments (images, files) - reactions (like, dislike) - toEntity(), fromEntity() methods 4. lib/data/models/subject_model.dart - id, name (Bengali), nameEn (English) - icon, color - isActive 5. lib/data/models/subscription_model.dart - id, userId - plan, price - startDate, endDate - isActive - paymentMethod 6. lib/data/models/settings_model.dart - theme (light/dark/system) - language (bn/en) - fontSize - soundEnabled - hapticEnabled - notificationsEnabled Use Freezed for immutable models with copyWith, json serialization. ``` --- ### **COMMAND E: Domain Entities** ``` Generate all domain entities for AI Tutor Flutter app: 1. lib/domain/entities/user_entity.dart 2. lib/domain/entities/chat_entity.dart 3. lib/domain/entities/message_entity.dart 4. lib/domain/entities/subject_entity.dart These should be simple Dart classes (not Freezed) representing the core business objects. Also generate repository interfaces: 5. lib/domain/repositories/auth_repository.dart - signIn(email, password) - signUp(email, password, name) - signInWithGoogle() - signOut() - resetPassword(email) - getCurrentUser() - isLoggedIn - deleteAccount() 6. lib/domain/repositories/chat_repository.dart - createChat(title) - getChats() - getChatById(id) - updateChat(chat) - deleteChat(id) - pinChat(id) - searchChats(query) 7. lib/domain/repositories/ai_repository.dart - sendMessage(prompt) - sendMessageStream(prompt) -> Stream - sendMessageWithImage(prompt, image) - sendMessageWithHistory(prompt, history) 8. lib/domain/repositories/message_repository.dart - getMessages(chatId) - addMessage(message) - updateMessage(message) - deleteMessage(id) ``` --- ### **COMMAND F: Firebase Services** ``` Generate all Firebase service files for AI Tutor Flutter app: 1. lib/data/datasources/remote/firebase_auth_service.dart Complete implementation with: - signInWithEmailPassword() - createUserWithEmailPassword() - signInWithGoogle() - signOut() - resetPassword() - getCurrentUser() - authStateChanges() - updateProfile() - deleteAccount() - verifyEmail() Include proper error handling with custom exceptions. 2. lib/data/datasources/remote/firestore_service.dart Complete implementation with: Users Collection: - createUser() - getUser() - updateUser() - deleteUser() - checkDailyLimit() - incrementQueryCount() Chats Collection: - createChat() - getChats() - getChatById() - updateChat() - deleteChat() - searchChats() - getChatStream() Messages Subcollection: - addMessage() - getMessages() - updateMessage() - deleteMessage() - getMessagesStream() Include real-time listeners and proper error handling. 3. lib/data/datasources/remote/firebase_storage_service.dart - uploadProfileImage() - uploadChatImage() - getDownloadUrl() - deleteFile() Include all imports and make production-ready. ``` --- ### **COMMAND G: Gemini API Service** ``` Generate complete Gemini API service for AI Tutor Flutter app: lib/data/datasources/remote/gemini_api_service.dart Complete implementation using google_generative_ai package: class GeminiApiService { late final GenerativeModel _model; late final GenerativeModel _visionModel; ChatSession? _chatSession; // Initialize with API key and system prompt void initialize(String apiKey); // System prompt for AI Tutor (Bengali teacher) String get _systemPrompt => """ তুমি একজন বাংলাদেশি AI শিক্ষক... """; // Single message (no history) Future<String> sendMessage(String prompt); // Streaming response Stream<String> sendMessageStream(String prompt); // With chat history (conversation context) Future<String> sendMessageWithHistory( String prompt, List<Content> history, ); // Stream with history Stream<String> sendMessageStreamWithHistory( String prompt, List<Content> history, ); // Image + Text (multimodal) Future<String> sendMessageWithImage( String prompt, Uint8List imageBytes, ); // Start new chat session void startNewChat(); // Clear chat session void clearChat(); // Count tokens Future<int> countTokens(String text); // Handle safety settings // Handle generation config (temperature, topK, topP) // Handle errors properly } Include: - Proper error handling (network, API, safety) - Retry logic - Rate limiting awareness - Token counting - Safety settings configuration - Generation config (temperature=0.7, topK=40, topP=0.95) - Complete Bengali system prompt for education ``` --- ### **COMMAND H: Riverpod Providers** ``` Generate all Riverpod providers for AI Tutor Flutter app: 1. lib/presentation/providers/auth_provider.dart - authStateProvider (stream of auth state) - currentUserProvider - loginProvider (async notifier) - registerProvider (async notifier) - logoutProvider - isLoadingProvider 2. lib/presentation/providers/chat_provider.dart - chatsProvider (list of all chats) - currentChatProvider (selected chat) - createChatProvider - deleteChatProvider - renameChatProvider - searchChatsProvider - pinnedChatsProvider 3. lib/presentation/providers/message_provider.dart - messagesProvider(chatId) (messages for a chat) - sendMessageProvider - isAiTypingProvider - streamingResponseProvider 4. lib/presentation/providers/theme_provider.dart - themeModeProvider (light/dark/system) - isDarkModeProvider (computed) - toggleThemeProvider 5. lib/presentation/providers/settings_provider.dart - settingsProvider - languageProvider - fontSizeProvider - soundEnabledProvider - updateSettingsProvider Use Riverpod 2.0 with proper StateNotifier and AsyncNotifier patterns. Include all imports and make production-ready. ``` --- ### **COMMAND I: Splash & Onboarding Screens** ``` Generate Splash and Onboarding screens for AI Tutor Flutter app: 1. lib/presentation/screens/splash/splash_screen.dart Beautiful animated splash with: - Animated gradient background (shifting colors) - App logo with scale + fade animation - Logo pulse/glow effect - App name "AI Tutor" with typing animation - Tagline "আপনার ব্যক্তিগত AI শিক্ষক" fade in - Lottie loading animation at bottom - Check auth state and navigate accordingly - Duration: 2-3 seconds 2. lib/presentation/screens/splash/widgets/animated_logo.dart - Scale animation - Rotation animation - Glow effect - Gradient border animation 3. lib/presentation/screens/onboarding/onboarding_screen.dart 3-4 page onboarding with: - PageView with smooth animations - Page 1: "AI শিক্ষক" - যেকোনো প্রশ্নের উত্তর পান - Page 2: "সব বিষয়" - গণিত, বিজ্ঞান, ইংরেজি - Page 3: "২৪/৭ সাহায্য" - যখন খুশি পড়ুন - Page 4: "শুরু করুন" - আজই শুরু করুন - Animated page indicator dots - Skip button (top right) - Next button with arrow animation - Get Started button on last page - Lottie animations for each page - Parallax effect on page swipe 4. lib/presentation/screens/onboarding/widgets/onboarding_page.dart 5. lib/presentation/screens/onboarding/widgets/page_indicator.dart Use flutter_animate package for smooth animations. Include all imports and complete code. ``` --- ### **COMMAND J: Authentication Screens** ``` Generate complete Authentication screens for AI Tutor Flutter app: 1. lib/presentation/screens/auth/login/login_screen.dart Beautiful login screen with: - Animated gradient background - App logo at top (animated) - "স্বাগতম!" welcome text with animation - "আপনার অ্যাকাউন্টে লগইন করুন" subtitle - Email TextField (with icon, validation) - Password TextField (with show/hide toggle) - Remember Me checkbox - Forgot Password link - Login Button (with loading state, gradient) - Divider with "অথবা" text - Google Sign-in button (with Google icon) - Facebook Sign-in button (optional) - "অ্যাকাউন্ট নেই? রেজিস্টার করুন" link - Form validation with error messages - Shake animation on error - Success animation on login 2. lib/presentation/screens/auth/login/widgets/login_form.dart 3. lib/presentation/screens/auth/login/widgets/social_login_buttons.dart 4. lib/presentation/screens/auth/register/register_screen.dart Registration screen with: - Full name TextField - Email TextField - Phone TextField (Bangladesh format) - Password TextField - Confirm Password TextField - Class/Grade dropdown - Terms & Conditions checkbox - Register Button - Already have account link - Form validation 5. lib/presentation/screens/auth/forgot_password/forgot_password_screen.dart - Email input - Send reset link button - Success/Error messages - Back to login Include all animations, validations, and Riverpod integration. ``` --- ### **COMMAND K: Home Screen** ``` Generate complete Home Screen for AI Tutor Flutter app: lib/presentation/screens/home/home_screen.dart Main home screen like ChatGPT/Gemini with: LAYOUT: - Scaffold with Drawer - Custom AppBar with menu icon, "AI Tutor" title, profile avatar - Responsive: Drawer on mobile, NavigationRail on tablet/desktop - FloatingActionButton for new chat EMPTY STATE (when no chat selected): - Centered animated AI logo - "আজ আপনাকে কিভাবে সাহায্য করতে পারি?" text - Animated gradient text - Quick action chips/cards: * "গণিত সমস্যা সমাধান করুন" 📐 * "ইংরেজি শিখুন" 📚 * "বিজ্ঞান বুঝুন" 🔬 * "প্রশ্ন জিজ্ঞাসা করুন" ❓ - Subject selection chips (animated) - Input field at bottom (like ChatGPT) WIDGETS: 1. lib/presentation/screens/home/widgets/home_app_bar.dart 2. lib/presentation/screens/home/widgets/welcome_section.dart 3. lib/presentation/screens/home/widgets/quick_actions.dart 4. lib/presentation/screens/home/widgets/subject_chips.dart 5. lib/presentation/screens/home/widgets/home_input_field.dart NAVIGATION DRAWER: 6. lib/presentation/widgets/navigation/app_drawer.dart - User profile header (photo, name, email) - New Chat button (prominent) - Search field - Chat history list grouped by date: * "আজ" * "গতকাল" * "আগের ৭ দিন" * "আগের ৩০ দিন" - Each chat item: icon, title, 3-dot menu - Settings link - Subscription link - Help link - Logout button 7. lib/presentation/widgets/navigation/drawer_header.dart 8. lib/presentation/widgets/navigation/chat_history_list.dart 9. lib/presentation/widgets/navigation/drawer_menu_item.dart Include all animations and responsive design. ``` --- ### **COMMAND L: Chat Screen (MOST IMPORTANT)** ``` Generate complete Chat Screen for AI Tutor Flutter app - this is the main feature: lib/presentation/screens/chat/chat_screen.dart LAYOUT: - AppBar: back button, chat title (editable), options menu (rename, share, delete) - Message list (ListView.builder, reversed for bottom-to-top) - Sticky input area at bottom - Safe area handling MESSAGE LIST: - User messages on right (colored bubble) - AI messages on left (with avatar) - Date separators - Smooth scroll - Scroll to bottom button (when scrolled up) - Pull to load more (older messages) WIDGETS: 1. lib/presentation/screens/chat/widgets/message_list.dart - ListView with animations - Staggered item animations - Date headers 2. lib/presentation/screens/chat/widgets/user_message_bubble.dart - Right aligned - Gradient background (green like ChatGPT) - Rounded corners (special shape) - Timestamp - Edit/Delete options on long press - Swipe to reply 3. lib/presentation/screens/chat/widgets/ai_message_bubble.dart - Left aligned - AI avatar (gradient circle with icon) - Light background (adapts to theme) - Markdown support: * Bold, italic, underline * Headings * Bullet lists, numbered lists * Code blocks with syntax highlighting * Tables * Links * Math equations (LaTeX) - Action buttons below: * 👍 Like (animated) * 👎 Dislike * 📋 Copy * 🔄 Regenerate * 📤 Share * 🔊 Read Aloud - Streaming text animation (word by word) 4. lib/presentation/screens/chat/widgets/typing_indicator.dart - Three bouncing dots animation - "AI Tutor টাইপ করছে..." text - Pulse effect 5. lib/presentation/screens/chat/widgets/chat_input_field.dart - Multi-line TextField (expandable) - Placeholder "আপনার প্রশ্ন লিখুন..." - Attachment button (📎) - opens image picker - Voice input button (🎤) - speech to text - Send button (arrow, animated) - Send button disabled when empty - Stop generation button (when AI responding) - Emoji button (optional) - Character count (optional) - Keyboard handling 6. lib/presentation/screens/chat/widgets/code_block.dart - Syntax highlighting - Language label - Copy code button - Line numbers (optional) 7. lib/presentation/screens/chat/widgets/markdown_renderer.dart - Complete markdown support - Custom styling - Link handling 8. lib/presentation/screens/chat/widgets/message_actions.dart - Action buttons row - Animated feedback on tap 9. lib/presentation/screens/chat/widgets/image_preview.dart - Display attached images - Tap to expand - Remove button Include complete Riverpod integration for: - Sending messages - Receiving streaming responses from Gemini - Loading states - Error handling Make it look and work exactly like ChatGPT! ``` --- ### **COMMAND M: Common Widgets & Animations** ``` Generate all common reusable widgets for AI Tutor Flutter app: 1. lib/presentation/widgets/common/custom_button.dart - Primary, Secondary, Tertiary variants - Gradient background option - Loading state with spinner - Disabled state - Icon support (left/right) - Full width option - Bounce animation on tap - Ripple effect 2. lib/presentation/widgets/common/custom_text_field.dart - Outlined and Filled variants - Prefix and suffix icons - Password visibility toggle - Error state with message - Label and hint - Character counter - Animated focus state - Validation support 3. lib/presentation/widgets/common/gradient_background.dart - Animated gradient (color shifting) - Multiple preset gradients - Custom gradient support - Performance optimized 4. lib/presentation/widgets/common/glassmorphism_card.dart - Frosted glass effect - Blur background - Subtle border - Works on light and dark theme 5. lib/presentation/widgets/common/shimmer_loading.dart - Shimmer effect for loading states - Configurable colors - Different shapes (rectangle, circle) 6. lib/presentation/widgets/common/loading_overlay.dart - Full screen loading - Lottie animation - Custom message 7. lib/presentation/widgets/common/empty_state.dart - Illustration/Lottie - Title and description - Action button 8. lib/presentation/widgets/common/error_widget.dart - Error illustration - Error message - Retry button 9. lib/presentation/widgets/common/fade_animation.dart 10. lib/presentation/widgets/common/slide_animation.dart 11. lib/presentation/widgets/common/scale_animation.dart 12. lib/presentation/widgets/common/bounce_animation.dart - Reusable animation wrappers - Using flutter_animate 13. lib/presentation/widgets/dialogs/confirm_dialog.dart - Icon at top - Title - Message - Cancel/Confirm buttons - Animated appearance - Destructive action style option 14. lib/presentation/widgets/sheets/chat_options_sheet.dart - Rename option - Pin option - Share option - Export option - Delete option (red) - Animated items Include all imports and make production-ready. ``` --- ### **COMMAND N: Settings & Profile Screens** ``` Generate Settings and Profile screens for AI Tutor Flutter app: 1. lib/presentation/screens/settings/settings_screen.dart Complete settings with sections: APPEARANCE: - Theme (Light ☀️ / Dark 🌙 / System 📱) - Accent color picker - Font size (Small/Medium/Large) LANGUAGE: - App language (বাংলা / English) - AI response language CHAT: - Save chat history (toggle) - Sound effects (toggle) - Haptic feedback (toggle) VOICE: - Voice input (toggle) - Voice output (toggle) - Speech speed slider NOTIFICATIONS: - Push notifications (toggle) - Daily reminder (toggle) PRIVACY: - Clear chat history (with confirmation) - Clear cache - Download my data ACCOUNT: - Change password - Delete account (with confirmation) ABOUT: - App version - Terms of Service - Privacy Policy - Rate app - Share app - Contact support 2. lib/presentation/screens/settings/widgets/settings_section.dart 3. lib/presentation/screens/settings/widgets/settings_tile.dart 4. lib/presentation/screens/settings/widgets/theme_selector.dart - Three options with icons - Animated selection - Preview of each theme 5. lib/presentation/screens/profile/profile_screen.dart - Cover photo - Profile picture (with edit button) - Name (editable) - Email - Phone - Class/Grade - Member since - Subscription badge STATS: - Total chats - Total questions - Learning streak - Animated counters ACHIEVEMENTS: - Badge grid - Locked/unlocked states 6. lib/presentation/screens/profile/widgets/profile_header.dart 7. lib/presentation/screens/profile/widgets/stats_section.dart 8. lib/presentation/screens/profile/widgets/edit_profile_sheet.dart Include all Riverpod providers and animations. ``` --- ### **COMMAND O: Subscription Screen** ``` Generate Subscription/Pricing screen for AI Tutor Flutter app: lib/presentation/screens/subscription/subscription_screen.dart Beautiful pricing page: HEADER: - Gradient background - Crown/Star icon - "প্রিমিয়াম আনলক করুন" title - "সীমাহীন শেখার সুযোগ পান" subtitle TOGGLE: - Monthly / Yearly switch - "২ মাস ফ্রি!" badge on yearly PRICING CARDS: FREE PLAN: - "ফ্রি" title - ৳০ - Features with checkmarks: * ✓ দৈনিক ১০টি প্রশ্ন * ✓ বেসিক বিষয়সমূহ * ✓ ৭ দিনের চ্যাট ইতিহাস * ✗ ভয়েস ইনপুট * ✗ ছবি আপলোড * ✗ বিজ্ঞাপন মুক্ত - Current Plan badge (if active) PREMIUM PLAN (Highlighted): - "প্রিমিয়াম" title with ⭐ - ৳৪৯/মাস or ৳৪৯৯/বছর - "সবচেয়ে জনপ্রিয়" badge - Glowing border animation - Features: * ✓ সীমাহীন প্রশ্ন * ✓ সব বিষয় * ✓ সীমাহীন চ্যাট ইতিহাস * ✓ ভয়েস ইনপুট * ✓ ছবি আপলোড * ✓ বিজ্ঞাপন মুক্ত * ✓ অগ্রাধিকার সাপোর্ট * ✓ কুইজ মোড - Subscribe button (gradient, animated) PAYMENT METHODS: - bKash (with logo) - Nagad (with logo) - Card (Visa/Master) FAQ: - Expandable FAQ items - Common subscription questions WIDGETS: 1. lib/presentation/screens/subscription/widgets/pricing_card.dart 2. lib/presentation/screens/subscription/widgets/feature_list.dart 3. lib/presentation/screens/subscription/widgets/payment_method_selector.dart Include all animations and make it visually appealing. ``` --- ### **COMMAND P: Router & Navigation** ``` Generate complete routing setup for AI Tutor Flutter app using GoRouter: 1. lib/core/router/route_names.dart - All route name constants - splash, onboarding, login, register, forgotPassword - home, chat, newChat, history - profile, settings, subscription - help, about 2. lib/core/router/app_router.dart Complete GoRouter configuration: - Splash screen as initial route - Auth flow (login, register, forgot) - Main flow (home, chat, history, etc.) - Redirect logic: * If not logged in → login * If logged in → home * If first time → onboarding - Path parameters (chat/:chatId) - Transition animations: * Fade for splash * Slide for screens * Modal for dialogs - Deep linking setup - Error handling (404 page) - Shell route for main layout Example structure: ```dart final router = GoRouter( initialLocation: '/', redirect: (context, state) { final isLoggedIn = ref.read(authProvider).isLoggedIn; final isOnboarded = ref.read(onboardingProvider).isCompleted; if (!isOnboarded) return '/onboarding'; if (!isLoggedIn) return '/login'; return null; }, routes: [ GoRoute(path: '/', builder: (_, __) => SplashScreen()), GoRoute(path: '/onboarding', builder: (_, __) => OnboardingScreen()), GoRoute(path: '/login', builder: (_, __) => LoginScreen()), ShellRoute( builder: (_, __, child) => MainShell(child: child), routes: [ GoRoute(path: '/home', builder: (_, __) => HomeScreen()), GoRoute(path: '/chat/:id', builder: (_, state) => ChatScreen( chatId: state.pathParameters['id'], )), // ... more routes ], ), ], ); ``` Include all imports and proper Riverpod integration. ``` --- ### **COMMAND Q: Main & App Files** ``` Generate main entry files for AI Tutor Flutter app: 1. lib/main.dart - Initialize Firebase - Initialize Hive - Setup error handling - Setup Riverpod ProviderScope - Run app 2. lib/app.dart - MaterialApp.router configuration - Theme setup (light/dark) - GoRouter integration - Localization setup (Bengali/English) - Responsive setup 3. lib/injection_container.dart - All dependency registration - Services - Repositories - Use cases - Using get_it or Riverpod providers Example main.dart: ```dart void main() async { WidgetsFlutterBinding.ensureInitialized(); // Firebase await Firebase.initializeApp( options: DefaultFirebaseOptions.currentPlatform, ); // Hive await Hive.initFlutter(); // Initialize services await initializeDependencies(); // Error handling FlutterError.onError = (details) { // Log error }; runApp( ProviderScope( child: AITutorApp(), ), ); } ``` Example app.dart: ```dart class AITutorApp extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { final themeMode = ref.watch(themeModeProvider); final router = ref.watch(routerProvider); return MaterialApp.router( title: 'AI Tutor BD', debugShowCheckedModeBanner: false, theme: AppTheme.lightTheme, darkTheme: AppTheme.darkTheme, themeMode: themeMode, routerConfig: router, // Localization... ); } } ``` Include all imports and Firebase options placeholder. ``` --- # 📋 **PART 4: HOW TO USE THESE COMMANDS** ## 🔄 Step-by-Step Process: ``` 1️⃣ Open Gemini (gemini.google.com or AI Studio) 2️⃣ Copy COMMAND A → Paste → Get pubspec.yaml Save file: ai_tutor_bd/pubspec.yaml 3️⃣ Run: flutter pub get 4️⃣ Copy COMMAND B → Paste → Get theme files Save to: lib/core/theme/ 5️⃣ Copy COMMAND C → Paste → Get utility files Save to: lib/core/ 6️⃣ Continue with COMMAND D, E, F... one by one 7️⃣ After each command, ask Gemini: "Continue with the next file" or "Give me the complete code for [specific file]" 8️⃣ If response is cut off, say: "Continue from where you stopped" ``` --- ## 💡 **IMPORTANT TIPS** ``` ✅ DO: - Use one command at a time - Save each file immediately - Run "flutter pub get" after pubspec.yaml - Test frequently - Ask for specific files if needed ❌ DON'T: - Don't paste all commands at once - Don't skip any files - Don't ignore errors ``` --- ## 🎯 **QUICK START COMMAND** ### যদি শুধু একটা Command দিয়ে সব চান: ``` You are an expert Flutter developer. Create a COMPLETE, PRODUCTION-READY AI Tutor application for all platforms (Android, iOS, Web, Windows, macOS, Linux). The app should be exactly like ChatGPT and Gemini combined with: - Beautiful animated UI (gradients, glassmorphism, smooth animations) - Firebase authentication (email, Google sign-in) - Firestore database for chat storage - Google Gemini API for AI responses - Riverpod for state management - GoRouter for navigation - Bengali language support - Dark/Light theme Start by generating the COMPLETE pubspec.yaml with ALL dependencies. Then I will ask for each file one by one. ``` --- ## 📱 **FINAL CHECKLIST** ``` □ Flutter installed ✓ □ Android Studio with Flutter plugin ✓ □ Firebase project created ✓ □ Gemini API key obtained ✓ □ Project created (flutter create) ✓ □ All commands executed ✓ □ All files saved ✓ □ flutter pub get successful ✓ □ No compilation errors ✓ □ App runs on emulator ✓ ``` --- আপনি এখন শুরু করতে পারেন! প্রথমে **COMMAND A** দিয়ে pubspec.yaml নিন, তারপর আমাকে জানান। আমি আপনাকে পরবর্তী Step এ Guide করব! 🚀
সম্পূর্ণ Flutter Project সব Platform এর জন্য (Android, iOS, Web, Windows, Linux, macOS) --- # 📋 **PART 1: প্রথমে Setup করুন** ## Step 1:...
🚀 Complete Flutter AI Tutor Building - Professional Commands
সম্পূর্ণ Flutter Project সব Platform এর জন্য (Android, iOS, Web, Windows, Linux, macOS) --- # 📋 **PART 1: প্রথমে Setup করুন** ## Step 1: Flutter Install করুন ``` Windows এ Flutter Install: ========================== 1. Flutter SDK Download করুন: https://docs.flutter.dev/get-started/install/windows 2. Extract করুন C:\flutter ফোল্ডারে 3. Environment Variable এ Path যোগ করুন: C:\flutter\bin 4. Command Prompt এ Check করুন: flutter doctor ``` ## Step 2: Android Studio Setup ``` 1. Android Studio Download করুন: https://developer.android.com/studio 2. Flutter Plugin Install করুন: File → Settings → Plugins → Search "Flutter" → Install 3. Dart Plugin ও Install হবে automatically 4. Android SDK Install করুন: SDK Manager → SDK Tools → Android SDK Command-line Tools ``` ## Step 3: প্রথম Project Create করুন ```bash # Terminal/Command Prompt এ: flutter create ai_tutor_bd --org com.aitutor cd ai_tutor_bd # All platforms enable করুন: flutter config --enable-web flutter config --enable-windows-desktop flutter config --enable-macos-desktop flutter config --enable-linux-desktop # Check করুন: flutter devices ``` --- # 📋 **PART 2: MASTER COMMAND FOR GEMINI** ## 🎯 **এই Command টি সম্পূর্ণ Copy করে Gemini তে Paste করুন** --- ``` You are an expert Flutter developer with 10+ years of experience. You will help me build a complete, professional, world-class AI Tutor application using Flutter that works on ALL platforms (Android, iOS, Web, Windows, Linux, macOS). ============================================================================== PROJECT OVERVIEW ============================================================================== PROJECT NAME: AI Tutor BD (আই টিউটর বিডি) DESCRIPTION: A professional AI-powered educational assistant for Bangladeshi students, similar to ChatGPT and Google Gemini with beautiful UI/UX, animations, and all modern features. TARGET AUDIENCE: Students and teachers in Bangladesh LANGUAGES: Bengali (বাংলা) as primary, English as secondary AI ENGINE: Google Gemini API (gemini-1.5-flash) BACKEND: Firebase (Authentication, Firestore, Storage) STATE MANAGEMENT: Riverpod 2.0 ARCHITECTURE: Clean Architecture with MVVM pattern ============================================================================== PLATFORMS & REQUIREMENTS ============================================================================== PLATFORMS: ├── Android (Min SDK 21, Target SDK 34) ├── iOS (Min iOS 12.0) ├── Web (Chrome, Firefox, Safari, Edge) ├── Windows (Windows 10+) ├── macOS (macOS 10.14+) └── Linux (Ubuntu 18.04+) DESIGN REQUIREMENTS: ├── Material Design 3 (Material You) ├── Responsive UI for all screen sizes ├── Dark/Light theme with system detection ├── Beautiful animations (Rive, Lottie) ├── Glassmorphism effects ├── Gradient colors like Gemini ├── Smooth 60fps animations └── Accessibility support ============================================================================== COMPLETE FILE STRUCTURE ============================================================================== ai_tutor_bd/ ├── lib/ │ ├── main.dart │ ├── app.dart │ │ │ ├── core/ │ │ ├── constants/ │ │ │ ├── app_constants.dart │ │ │ ├── api_constants.dart │ │ │ ├── color_constants.dart │ │ │ ├── string_constants.dart │ │ │ └── asset_constants.dart │ │ │ │ │ ├── theme/ │ │ │ ├── app_theme.dart │ │ │ ├── app_colors.dart │ │ │ ├── app_typography.dart │ │ │ ├── app_shapes.dart │ │ │ └── theme_provider.dart │ │ │ │ │ ├── router/ │ │ │ ├── app_router.dart │ │ │ └── route_names.dart │ │ │ │ │ ├── utils/ │ │ │ ├── extensions/ │ │ │ │ ├── string_extensions.dart │ │ │ │ ├── context_extensions.dart │ │ │ │ ├── date_extensions.dart │ │ │ │ └── widget_extensions.dart │ │ │ ├── helpers/ │ │ │ │ ├── validator_helper.dart │ │ │ │ ├── date_helper.dart │ │ │ │ ├── format_helper.dart │ │ │ │ └── platform_helper.dart │ │ │ └── logger.dart │ │ │ │ │ ├── errors/ │ │ │ ├── failures.dart │ │ │ └── exceptions.dart │ │ │ │ │ └── network/ │ │ ├── network_info.dart │ │ └── api_client.dart │ │ │ ├── data/ │ │ ├── datasources/ │ │ │ ├── local/ │ │ │ │ ├── local_storage.dart │ │ │ │ ├── hive_service.dart │ │ │ │ └── shared_prefs_service.dart │ │ │ └── remote/ │ │ │ ├── firebase_auth_service.dart │ │ │ ├── firestore_service.dart │ │ │ ├── firebase_storage_service.dart │ │ │ └── gemini_api_service.dart │ │ │ │ │ ├── models/ │ │ │ ├── user_model.dart │ │ │ ├── chat_model.dart │ │ │ ├── message_model.dart │ │ │ ├── subject_model.dart │ │ │ ├── subscription_model.dart │ │ │ └── settings_model.dart │ │ │ │ │ └── repositories/ │ │ ├── auth_repository_impl.dart │ │ ├── chat_repository_impl.dart │ │ ├── ai_repository_impl.dart │ │ ├── user_repository_impl.dart │ │ └── settings_repository_impl.dart │ │ │ ├── domain/ │ │ ├── entities/ │ │ │ ├── user_entity.dart │ │ │ ├── chat_entity.dart │ │ │ ├── message_entity.dart │ │ │ └── subject_entity.dart │ │ │ │ │ ├── repositories/ │ │ │ ├── auth_repository.dart │ │ │ ├── chat_repository.dart │ │ │ ├── ai_repository.dart │ │ │ ├── user_repository.dart │ │ │ └── settings_repository.dart │ │ │ │ │ └── usecases/ │ │ ├── auth/ │ │ │ ├── login_usecase.dart │ │ │ ├── register_usecase.dart │ │ │ ├── logout_usecase.dart │ │ │ ├── google_signin_usecase.dart │ │ │ └── reset_password_usecase.dart │ │ ├── chat/ │ │ │ ├── create_chat_usecase.dart │ │ │ ├── get_chats_usecase.dart │ │ │ ├── delete_chat_usecase.dart │ │ │ ├── rename_chat_usecase.dart │ │ │ └── pin_chat_usecase.dart │ │ ├── message/ │ │ │ ├── send_message_usecase.dart │ │ │ ├── get_messages_usecase.dart │ │ │ └── delete_message_usecase.dart │ │ └── ai/ │ │ ├── generate_response_usecase.dart │ │ ├── generate_stream_usecase.dart │ │ └── analyze_image_usecase.dart │ │ │ ├── presentation/ │ │ ├── providers/ │ │ │ ├── auth_provider.dart │ │ │ ├── chat_provider.dart │ │ │ ├── message_provider.dart │ │ │ ├── theme_provider.dart │ │ │ ├── settings_provider.dart │ │ │ └── subscription_provider.dart │ │ │ │ │ ├── screens/ │ │ │ ├── splash/ │ │ │ │ ├── splash_screen.dart │ │ │ │ └── widgets/ │ │ │ │ ├── animated_logo.dart │ │ │ │ └── loading_indicator.dart │ │ │ │ │ │ │ ├── onboarding/ │ │ │ │ ├── onboarding_screen.dart │ │ │ │ └── widgets/ │ │ │ │ ├── onboarding_page.dart │ │ │ │ ├── page_indicator.dart │ │ │ │ └── onboarding_button.dart │ │ │ │ │ │ │ ├── auth/ │ │ │ │ ├── login/ │ │ │ │ │ ├── login_screen.dart │ │ │ │ │ └── widgets/ │ │ │ │ │ ├── login_form.dart │ │ │ │ │ ├── social_login_buttons.dart │ │ │ │ │ └── forgot_password_link.dart │ │ │ │ ├── register/ │ │ │ │ │ ├── register_screen.dart │ │ │ │ │ └── widgets/ │ │ │ │ │ ├── register_form.dart │ │ │ │ │ └── terms_checkbox.dart │ │ │ │ └── forgot_password/ │ │ │ │ └── forgot_password_screen.dart │ │ │ │ │ │ │ ├── home/ │ │ │ │ ├── home_screen.dart │ │ │ │ └── widgets/ │ │ │ │ ├── home_app_bar.dart │ │ │ │ ├── welcome_section.dart │ │ │ │ ├── quick_actions.dart │ │ │ │ ├── subject_chips.dart │ │ │ │ └── home_input_field.dart │ │ │ │ │ │ │ ├── chat/ │ │ │ │ ├── chat_screen.dart │ │ │ │ └── widgets/ │ │ │ │ ├── chat_app_bar.dart │ │ │ │ ├── message_list.dart │ │ │ │ ├── message_bubble.dart │ │ │ │ ├── user_message_bubble.dart │ │ │ │ ├── ai_message_bubble.dart │ │ │ │ ├── typing_indicator.dart │ │ │ │ ├── chat_input_field.dart │ │ │ │ ├── attachment_button.dart │ │ │ │ ├── voice_input_button.dart │ │ │ │ ├── send_button.dart │ │ │ │ ├── message_actions.dart │ │ │ │ ├── code_block.dart │ │ │ │ ├── markdown_renderer.dart │ │ │ │ └── image_preview.dart │ │ │ │ │ │ │ ├── history/ │ │ │ │ ├── history_screen.dart │ │ │ │ └── widgets/ │ │ │ │ ├── search_bar.dart │ │ │ │ ├── chat_history_item.dart │ │ │ │ ├── date_header.dart │ │ │ │ └── chat_options_sheet.dart │ │ │ │ │ │ │ ├── profile/ │ │ │ │ ├── profile_screen.dart │ │ │ │ └── widgets/ │ │ │ │ ├── profile_header.dart │ │ │ │ ├── stats_section.dart │ │ │ │ ├── achievements_section.dart │ │ │ │ └── edit_profile_sheet.dart │ │ │ │ │ │ │ ├── settings/ │ │ │ │ ├── settings_screen.dart │ │ │ │ └── widgets/ │ │ │ │ ├── settings_section.dart │ │ │ │ ├── settings_tile.dart │ │ │ │ ├── theme_selector.dart │ │ │ │ ├── language_selector.dart │ │ │ │ └── about_section.dart │ │ │ │ │ │ │ └── subscription/ │ │ │ ├── subscription_screen.dart │ │ │ └── widgets/ │ │ │ ├── pricing_card.dart │ │ │ ├── feature_list.dart │ │ │ ├── payment_method_selector.dart │ │ │ └── subscription_benefits.dart │ │ │ │ │ └── widgets/ │ │ ├── common/ │ │ │ ├── custom_button.dart │ │ │ ├── custom_text_field.dart │ │ │ ├── custom_icon_button.dart │ │ │ ├── loading_overlay.dart │ │ │ ├── error_widget.dart │ │ │ ├── empty_state.dart │ │ │ ├── shimmer_loading.dart │ │ │ ├── animated_container.dart │ │ │ ├── gradient_background.dart │ │ │ ├── glassmorphism_card.dart │ │ │ ├── animated_gradient_border.dart │ │ │ ├── pulse_animation.dart │ │ │ ├── bounce_animation.dart │ │ │ ├── fade_animation.dart │ │ │ ├── slide_animation.dart │ │ │ ├── scale_animation.dart │ │ │ ├── responsive_builder.dart │ │ │ ├── platform_widget.dart │ │ │ └── adaptive_layout.dart │ │ │ │ │ ├── dialogs/ │ │ │ ├── confirm_dialog.dart │ │ │ ├── error_dialog.dart │ │ │ ├── success_dialog.dart │ │ │ ├── loading_dialog.dart │ │ │ └── input_dialog.dart │ │ │ │ │ ├── navigation/ │ │ │ ├── app_drawer.dart │ │ │ ├── drawer_header.dart │ │ │ ├── drawer_menu_item.dart │ │ │ ├── chat_history_list.dart │ │ │ ├── bottom_nav_bar.dart │ │ │ └── side_navigation_rail.dart │ │ │ │ │ └── sheets/ │ │ ├── subject_selection_sheet.dart │ │ ├── chat_options_sheet.dart │ │ ├── image_picker_sheet.dart │ │ ├── share_sheet.dart │ │ └── export_sheet.dart │ │ │ └── injection_container.dart │ ├── assets/ │ ├── images/ │ │ ├── logo.png │ │ ├── logo_dark.png │ │ ├── onboarding_1.png │ │ ├── onboarding_2.png │ │ ├── onboarding_3.png │ │ ├── empty_chat.png │ │ ├── no_internet.png │ │ └── error.png │ │ │ ├── icons/ │ │ ├── google.svg │ │ ├── facebook.svg │ │ ├── bkash.svg │ │ ├── nagad.svg │ │ └── subjects/ │ │ ├── math.svg │ │ ├── science.svg │ │ ├── english.svg │ │ ├── bangla.svg │ │ ├── physics.svg │ │ ├── chemistry.svg │ │ ├── biology.svg │ │ ├── ict.svg │ │ └── gk.svg │ │ │ ├── animations/ │ │ ├── loading.json │ │ ├── success.json │ │ ├── error.json │ │ ├── typing.json │ │ ├── ai_thinking.json │ │ ├── confetti.json │ │ └── empty.json │ │ │ └── fonts/ │ ├── HindSiliguri-Regular.ttf │ ├── HindSiliguri-Medium.ttf │ ├── HindSiliguri-SemiBold.ttf │ ├── HindSiliguri-Bold.ttf │ ├── Inter-Regular.ttf │ ├── Inter-Medium.ttf │ ├── Inter-SemiBold.ttf │ ├── Inter-Bold.ttf │ ├── JetBrainsMono-Regular.ttf │ └── JetBrainsMono-Bold.ttf │ ├── test/ │ ├── unit/ │ ├── widget/ │ └── integration/ │ ├── android/ ├── ios/ ├── web/ ├── windows/ ├── macos/ ├── linux/ │ ├── pubspec.yaml ├── analysis_options.yaml └── README.md ============================================================================== DEPENDENCIES (pubspec.yaml) ============================================================================== Generate complete pubspec.yaml with these dependencies: name: ai_tutor_bd description: Professional AI Tutor for Bangladesh students publish_to: 'none' version: 1.0.0+1 environment: sdk: '>=3.2.0 <4.0.0' dependencies: flutter: sdk: flutter # State Management flutter_riverpod: ^2.4.10 riverpod_annotation: ^2.3.4 # Routing go_router: ^13.2.0 # Firebase firebase_core: ^2.27.0 firebase_auth: ^4.17.8 cloud_firestore: ^4.15.8 firebase_storage: ^11.6.9 firebase_analytics: ^10.8.9 # Google Sign In google_sign_in: ^6.2.1 # Google Generative AI (Gemini) google_generative_ai: ^0.2.2 # Local Storage hive: ^2.2.3 hive_flutter: ^1.1.0 shared_preferences: ^2.2.2 # Network dio: ^5.4.1 connectivity_plus: ^5.0.2 # UI Components flutter_svg: ^2.0.10+1 cached_network_image: ^3.3.1 shimmer: ^3.0.0 flutter_staggered_animations: ^1.1.1 # Animations lottie: ^3.1.0 rive: ^0.12.4 animate_do: ^3.3.3 flutter_animate: ^4.5.0 # Icons iconsax: ^0.0.8 flutter_iconly: ^1.0.2 hugeicons: ^0.0.7 # Text & Markdown flutter_markdown: ^0.6.22 markdown: ^7.2.1 flutter_math_fork: ^0.7.2 flutter_highlight: ^0.7.0 # Image image_picker: ^1.0.7 photo_view: ^0.14.0 image_cropper: ^5.0.1 # Speech speech_to_text: ^6.6.0 flutter_tts: ^4.0.2 # Utils uuid: ^4.3.3 intl: ^0.19.0 timeago: ^3.6.1 url_launcher: ^6.2.4 share_plus: ^7.2.2 path_provider: ^2.1.2 permission_handler: ^11.3.0 clipboard: ^0.1.3 # PDF & Export pdf: ^3.10.8 printing: ^5.12.0 # Responsive flutter_screenutil: ^5.9.0 responsive_framework: ^1.1.1 # Keyboard flutter_keyboard_visibility: ^6.0.0 # Loading flutter_spinkit: ^5.2.1 loading_animation_widget: ^1.2.0+4 # Toast & Snackbar fluttertoast: ^8.2.4 elegant_notification: ^2.2.0 # Form Validation form_field_validator: ^1.1.0 # Device Info device_info_plus: ^10.1.0 package_info_plus: ^5.0.1 # Code Generation freezed_annotation: ^2.4.1 json_annotation: ^4.8.1 dev_dependencies: flutter_test: sdk: flutter flutter_lints: ^3.0.1 riverpod_generator: ^2.3.11 build_runner: ^2.4.8 freezed: ^2.4.7 json_serializable: ^6.7.1 hive_generator: ^2.0.1 flutter_launcher_icons: ^0.13.1 flutter_native_splash: ^2.3.10 flutter: uses-material-design: true assets: - assets/images/ - assets/icons/ - assets/icons/subjects/ - assets/animations/ fonts: - family: HindSiliguri fonts: - asset: assets/fonts/HindSiliguri-Regular.ttf - asset: assets/fonts/HindSiliguri-Medium.ttf weight: 500 - asset: assets/fonts/HindSiliguri-SemiBold.ttf weight: 600 - asset: assets/fonts/HindSiliguri-Bold.ttf weight: 700 - family: Inter fonts: - asset: assets/fonts/Inter-Regular.ttf - asset: assets/fonts/Inter-Medium.ttf weight: 500 - asset: assets/fonts/Inter-SemiBold.ttf weight: 600 - asset: assets/fonts/Inter-Bold.ttf weight: 700 - family: JetBrainsMono fonts: - asset: assets/fonts/JetBrainsMono-Regular.ttf - asset: assets/fonts/JetBrainsMono-Bold.ttf weight: 700 ============================================================================== FEATURES TO IMPLEMENT ============================================================================== AUTHENTICATION FEATURES: ======================== ☑️ Email/Password Login ☑️ Email/Password Registration ☑️ Google Sign-In ☑️ Facebook Sign-In (optional) ☑️ Phone Number + OTP Login ☑️ Forgot Password ☑️ Email Verification ☑️ Password Reset ☑️ Remember Me ☑️ Auto Login ☑️ Logout ☑️ Delete Account ☑️ Session Management ☑️ Biometric Login (Fingerprint/Face) CHAT FEATURES: ============== ☑️ New Chat Creation ☑️ Chat with AI (Gemini) ☑️ Streaming Response (word by word) ☑️ Message History ☑️ Context Memory (remembers conversation) ☑️ Markdown Rendering ☑️ Code Syntax Highlighting ☑️ LaTeX Math Equations ☑️ Tables Rendering ☑️ Copy Message ☑️ Copy Code Block ☑️ Regenerate Response ☑️ Edit User Message ☑️ Delete Message ☑️ Like/Dislike Response ☑️ Share Message ☑️ Read Aloud (Text-to-Speech) ☑️ Voice Input (Speech-to-Text) ☑️ Image Upload & Analysis ☑️ Camera Capture ☑️ File Upload (PDF, Doc) ☑️ Stop Generation ☑️ Typing Indicator Animation CHAT HISTORY FEATURES: ====================== ☑️ All Chats List ☑️ Search Chats ☑️ Filter by Date ☑️ Filter by Subject ☑️ Rename Chat ☑️ Pin Chat ☑️ Archive Chat ☑️ Delete Chat ☑️ Bulk Delete ☑️ Export Chat (PDF, Text) ☑️ Share Chat Link ☑️ Group by Date (Today, Yesterday, etc.) NAVIGATION DRAWER FEATURES: =========================== ☑️ User Profile Header ☑️ New Chat Button ☑️ Chat History List ☑️ Search in Chats ☑️ Settings Link ☑️ Subscription/Upgrade Link ☑️ Help & FAQ Link ☑️ Logout Button ☑️ Swipe to Open/Close ☑️ Animated Items SETTINGS FEATURES: ================== ☑️ Theme Selection (Light/Dark/System) ☑️ Accent Color Picker ☑️ Language Selection (Bengali/English) ☑️ Font Size Adjustment ☑️ Chat Bubble Style ☑️ Sound Effects Toggle ☑️ Haptic Feedback Toggle ☑️ Push Notifications Toggle ☑️ Chat History Toggle ☑️ Data Saving Mode ☑️ Clear Cache ☑️ Clear Chat History ☑️ Download My Data ☑️ Privacy Settings ☑️ About App ☑️ Rate App ☑️ Share App ☑️ Contact Support PROFILE FEATURES: ================= ☑️ Profile Picture (View/Change) ☑️ Display Name ☑️ Email Display ☑️ Phone Number ☑️ Class/Grade Selection ☑️ Institution Name ☑️ Learning Statistics ☑️ Achievements/Badges ☑️ Streak Calendar ☑️ Study Time Tracker ☑️ Edit Profile SUBSCRIPTION FEATURES: ====================== ☑️ Free Plan ☑️ Premium Plan ☑️ Institution Plan ☑️ Monthly/Yearly Toggle ☑️ Feature Comparison ☑️ bKash Payment ☑️ Nagad Payment ☑️ Card Payment (SSLCommerz) ☑️ Promo Code ☑️ Receipt Download ☑️ Cancel Subscription ☑️ Upgrade/Downgrade EDUCATION FEATURES: =================== ☑️ Subject Selection ☑️ Class/Grade Selection ☑️ Bangladesh Curriculum (NCTB) ☑️ Board Selection ☑️ Quiz Mode ☑️ Practice Mode ☑️ Exam Prep Mode ☑️ Progress Tracking ☑️ Weak Areas Identification UI/UX FEATURES: =============== ☑️ Splash Screen with Animation ☑️ Onboarding Screens ☑️ Pull to Refresh ☑️ Infinite Scroll ☑️ Skeleton Loading ☑️ Shimmer Effects ☑️ Toast Messages ☑️ Snackbars ☑️ Bottom Sheets ☑️ Dialogs ☑️ Smooth Animations ☑️ Haptic Feedback ☑️ Responsive Layout ☑️ Tablet/Desktop Support ANIMATION TYPES TO USE: ======================= ☑️ Fade In/Out ☑️ Slide Up/Down/Left/Right ☑️ Scale In/Out ☑️ Bounce ☑️ Pulse ☑️ Shimmer ☑️ Lottie Animations ☑️ Rive Animations ☑️ Hero Transitions ☑️ Staggered Animations ☑️ Typing Effect ☑️ Particle Effects ☑️ Gradient Animations ☑️ Glassmorphism ☑️ Parallax Effects ============================================================================== COLOR SCHEME ============================================================================== PRIMARY COLORS (Gradient like Gemini): - primaryLight: #6750A4 (Purple) - primaryDark: #D0BCFF - gradientStart: #667EEA (Blue) - gradientMiddle: #764BA2 (Purple) - gradientEnd: #F093FB (Pink) CHAT COLORS: - userBubble: #10A37F (ChatGPT Green) - userBubbleDark: #19C37D - aiBubbleLight: #F7F7F8 - aiBubbleDark: #444654 - aiAvatarBg: #AB68FF BACKGROUND COLORS: - backgroundLight: #FFFFFF - backgroundDark: #0D0D0D (ChatGPT Dark) - surfaceLight: #F7F7F8 - surfaceDark: #1A1A2E - sidebarLight: #F7F7F8 - sidebarDark: #171717 ACCENT COLORS: - accentBlue: #2196F3 - accentPurple: #9C27B0 - accentPink: #E91E63 - accentTeal: #009688 - accentOrange: #FF9800 - accentGreen: #4CAF50 - accentRed: #F44336 STATUS COLORS: - success: #4CAF50 - error: #EF4444 - warning: #F59E0B - info: #3B82F6 ============================================================================== GEMINI API SYSTEM PROMPT ============================================================================== final String systemPrompt = """ তুমি একজন বাংলাদেশি AI শিক্ষক। তোমার নাম "AI Tutor" (আই টিউটর)। তোমার পরিচয়: - তুমি বাংলাদেশের শিক্ষার্থীদের জন্য তৈরি একজন AI শিক্ষা সহকারী - তুমি সব বিষয়ে সাহায্য করতে পারো - তুমি NCTB (জাতীয় শিক্ষাক্রম ও পাঠ্যপুস্তক বোর্ড) এর পাঠ্যক্রম অনুসরণ করো তোমার আচরণ: - সবসময় বাংলায় উত্তর দেবে (যদি না ইংরেজিতে জিজ্ঞাসা করা হয়) - সহজ ও সাবলীল ভাষায় বোঝাবে - জটিল বিষয় সহজ উদাহরণ দিয়ে বোঝাবে - Step-by-step সমাধান দেখাবে - প্রয়োজনে ছবি বা diagram এর বর্ণনা দেবে - শিক্ষার্থীদের উৎসাহিত করবে তুমি যা পারো: - গণিত সমস্যা সমাধান (step-by-step) - বিজ্ঞানের ধারণা ব্যাখ্যা - ইংরেজি গ্রামার ও writing - বাংলা সাহিত্য ও ব্যাকরণ - সাধারণ জ্ঞান ও কুইজ - পরীক্ষার প্রস্তুতি - Homework সাহায্য - Concept পরিষ্কার করা - কোড লেখা ও explain করা তুমি যা করবে না: - অনৈতিক বা অনুপযুক্ত বিষয়ে আলোচনা - পরীক্ষায় নকল করতে সাহায্য - ভুল বা বিভ্রান্তিকর তথ্য দেওয়া - অন্য কারো ব্যক্তিগত তথ্য শেয়ার করা Format Guidelines: - Math equations: Use proper mathematical notation - Code: Use proper syntax highlighting markers - Lists: Use bullet points or numbers - Important points: Use bold or emphasis - Structure long answers with headings """; ============================================================================== IMPORTANT NOTES ============================================================================== 1. Use Material 3 design with dynamic colors 2. Support both Bengali and English 3. Make all UI responsive for all screen sizes 4. Use proper error handling everywhere 5. Implement offline support where possible 6. Optimize for performance (60fps) 7. Follow Flutter best practices 8. Write clean, maintainable code 9. Add proper comments in code 10. Implement proper loading states 11. Handle edge cases properly 12. Use proper state management with Riverpod 13. Implement proper navigation with GoRouter 14. Use proper dependency injection 15. Follow Clean Architecture strictly ============================================================================== NOW GENERATE CODE ============================================================================== Now I want you to generate the complete code for this project. Start with: STEP 1: Generate pubspec.yaml (complete with all dependencies) STEP 2: Generate main.dart and app.dart STEP 3: Generate all files in core/ folder (constants, theme, router, utils) STEP 4: Generate all files in data/ folder (models, datasources, repositories) STEP 5: Generate all files in domain/ folder (entities, repositories, usecases) STEP 6: Generate all files in presentation/ folder (providers, screens, widgets) STEP 7: Generate injection_container.dart Start with STEP 1 now. Generate the complete pubspec.yaml file. After I receive the first file, I will ask for the next files one by one. Make sure: - All code is complete and error-free - All imports are correct - Bengali text is properly included - Animations are implemented - The code follows best practices - Everything is production-ready ``` --- # 📋 **PART 3: STEP-BY-STEP COMMANDS (যদি উপরেরটা বড় হয়)** ## যদি Gemini বলে "Too long" তাহলে এই ছোট Commands গুলো Use করুন: --- ### **COMMAND A: Project Setup** ``` Create a complete Flutter AI Tutor project setup. Project Name: ai_tutor_bd Package: com.aitutor.bd Platforms: Android, iOS, Web, Windows, macOS, Linux Generate: 1. Complete pubspec.yaml with all dependencies for: - Riverpod (state management) - GoRouter (navigation) - Firebase (auth, firestore, storage) - Google Generative AI (Gemini) - Hive (local storage) - Dio (networking) - Lottie, Rive (animations) - flutter_markdown (markdown) - speech_to_text, flutter_tts (voice) - image_picker (images) - All UI packages 2. analysis_options.yaml 3. .gitignore Include Bengali font support (HindSiliguri) and English font (Inter). ``` --- ### **COMMAND B: Theme & Colors** ``` Generate complete theme files for AI Tutor Flutter app: 1. lib/core/theme/app_colors.dart - Light and Dark color schemes - Gradient colors like Gemini (purple, blue, pink) - Chat bubble colors like ChatGPT (green for user, gray for AI) - All status colors (success, error, warning, info) - Glassmorphism colors 2. lib/core/theme/app_theme.dart - Material 3 ThemeData for light mode - Material 3 ThemeData for dark mode - Custom component themes (button, input, card, etc.) - Proper color scheme configuration 3. lib/core/theme/app_typography.dart - Bengali font (HindSiliguri) configuration - English font (Inter) configuration - Code font (JetBrainsMono) configuration - All text styles (headline, body, label, etc.) - Responsive font sizes 4. lib/core/theme/app_shapes.dart - Border radius values - Shape configurations - Chat bubble shapes Make colors beautiful like Gemini and ChatGPT combined. ``` --- ### **COMMAND C: Core Utilities** ``` Generate all core utility files for AI Tutor Flutter app: 1. lib/core/constants/app_constants.dart - App name, version - API keys placeholder - Limits (free/premium queries) - Subjects list with Bengali names and icons - Class/grade list 2. lib/core/constants/string_constants.dart - All Bengali strings - All English strings - Error messages - Button labels - Placeholders 3. lib/core/utils/extensions/string_extensions.dart - isValidEmail - isValidPassword - isValidPhone - truncate - capitalizeFirst 4. lib/core/utils/extensions/context_extensions.dart - showSnackBar - showToast - theme shortcuts - navigator shortcuts 5. lib/core/utils/extensions/date_extensions.dart - toRelativeTime (e.g., "2 hours ago" in Bengali) - toFormattedDate - toFormattedTime - isToday, isYesterday 6. lib/core/utils/helpers/validator_helper.dart - Email validation - Password validation - Phone validation - Name validation 7. lib/core/utils/logger.dart - Debug logging - Error logging - Info logging Include all imports and make code production-ready. ``` --- ### **COMMAND D: Data Models** ``` Generate all data models for AI Tutor Flutter app using Freezed: 1. lib/data/models/user_model.dart - id, name, email, photoUrl - phone, dateOfBirth - class/grade, institution - plan (free/premium), planExpiry - settings (theme, language, notifications) - createdAt, lastLoginAt - totalQueries, dailyQueries - toEntity(), fromEntity() methods - toJson(), fromJson() methods 2. lib/data/models/chat_model.dart - id, title, userId - subject, icon - createdAt, updatedAt - isPinned, isArchived - messageCount, lastMessage - toEntity(), fromEntity() methods 3. lib/data/models/message_model.dart - id, chatId - content, role (user/assistant) - timestamp - isEdited - attachments (images, files) - reactions (like, dislike) - toEntity(), fromEntity() methods 4. lib/data/models/subject_model.dart - id, name (Bengali), nameEn (English) - icon, color - isActive 5. lib/data/models/subscription_model.dart - id, userId - plan, price - startDate, endDate - isActive - paymentMethod 6. lib/data/models/settings_model.dart - theme (light/dark/system) - language (bn/en) - fontSize - soundEnabled - hapticEnabled - notificationsEnabled Use Freezed for immutable models with copyWith, json serialization. ``` --- ### **COMMAND E: Domain Entities** ``` Generate all domain entities for AI Tutor Flutter app: 1. lib/domain/entities/user_entity.dart 2. lib/domain/entities/chat_entity.dart 3. lib/domain/entities/message_entity.dart 4. lib/domain/entities/subject_entity.dart These should be simple Dart classes (not Freezed) representing the core business objects. Also generate repository interfaces: 5. lib/domain/repositories/auth_repository.dart - signIn(email, password) - signUp(email, password, name) - signInWithGoogle() - signOut() - resetPassword(email) - getCurrentUser() - isLoggedIn - deleteAccount() 6. lib/domain/repositories/chat_repository.dart - createChat(title) - getChats() - getChatById(id) - updateChat(chat) - deleteChat(id) - pinChat(id) - searchChats(query) 7. lib/domain/repositories/ai_repository.dart - sendMessage(prompt) - sendMessageStream(prompt) -> Stream - sendMessageWithImage(prompt, image) - sendMessageWithHistory(prompt, history) 8. lib/domain/repositories/message_repository.dart - getMessages(chatId) - addMessage(message) - updateMessage(message) - deleteMessage(id) ``` --- ### **COMMAND F: Firebase Services** ``` Generate all Firebase service files for AI Tutor Flutter app: 1. lib/data/datasources/remote/firebase_auth_service.dart Complete implementation with: - signInWithEmailPassword() - createUserWithEmailPassword() - signInWithGoogle() - signOut() - resetPassword() - getCurrentUser() - authStateChanges() - updateProfile() - deleteAccount() - verifyEmail() Include proper error handling with custom exceptions. 2. lib/data/datasources/remote/firestore_service.dart Complete implementation with: Users Collection: - createUser() - getUser() - updateUser() - deleteUser() - checkDailyLimit() - incrementQueryCount() Chats Collection: - createChat() - getChats() - getChatById() - updateChat() - deleteChat() - searchChats() - getChatStream() Messages Subcollection: - addMessage() - getMessages() - updateMessage() - deleteMessage() - getMessagesStream() Include real-time listeners and proper error handling. 3. lib/data/datasources/remote/firebase_storage_service.dart - uploadProfileImage() - uploadChatImage() - getDownloadUrl() - deleteFile() Include all imports and make production-ready. ``` --- ### **COMMAND G: Gemini API Service** ``` Generate complete Gemini API service for AI Tutor Flutter app: lib/data/datasources/remote/gemini_api_service.dart Complete implementation using google_generative_ai package: class GeminiApiService { late final GenerativeModel _model; late final GenerativeModel _visionModel; ChatSession? _chatSession; // Initialize with API key and system prompt void initialize(String apiKey); // System prompt for AI Tutor (Bengali teacher) String get _systemPrompt => """ তুমি একজন বাংলাদেশি AI শিক্ষক... """; // Single message (no history) Future<String> sendMessage(String prompt); // Streaming response Stream<String> sendMessageStream(String prompt); // With chat history (conversation context) Future<String> sendMessageWithHistory( String prompt, List<Content> history, ); // Stream with history Stream<String> sendMessageStreamWithHistory( String prompt, List<Content> history, ); // Image + Text (multimodal) Future<String> sendMessageWithImage( String prompt, Uint8List imageBytes, ); // Start new chat session void startNewChat(); // Clear chat session void clearChat(); // Count tokens Future<int> countTokens(String text); // Handle safety settings // Handle generation config (temperature, topK, topP) // Handle errors properly } Include: - Proper error handling (network, API, safety) - Retry logic - Rate limiting awareness - Token counting - Safety settings configuration - Generation config (temperature=0.7, topK=40, topP=0.95) - Complete Bengali system prompt for education ``` --- ### **COMMAND H: Riverpod Providers** ``` Generate all Riverpod providers for AI Tutor Flutter app: 1. lib/presentation/providers/auth_provider.dart - authStateProvider (stream of auth state) - currentUserProvider - loginProvider (async notifier) - registerProvider (async notifier) - logoutProvider - isLoadingProvider 2. lib/presentation/providers/chat_provider.dart - chatsProvider (list of all chats) - currentChatProvider (selected chat) - createChatProvider - deleteChatProvider - renameChatProvider - searchChatsProvider - pinnedChatsProvider 3. lib/presentation/providers/message_provider.dart - messagesProvider(chatId) (messages for a chat) - sendMessageProvider - isAiTypingProvider - streamingResponseProvider 4. lib/presentation/providers/theme_provider.dart - themeModeProvider (light/dark/system) - isDarkModeProvider (computed) - toggleThemeProvider 5. lib/presentation/providers/settings_provider.dart - settingsProvider - languageProvider - fontSizeProvider - soundEnabledProvider - updateSettingsProvider Use Riverpod 2.0 with proper StateNotifier and AsyncNotifier patterns. Include all imports and make production-ready. ``` --- ### **COMMAND I: Splash & Onboarding Screens** ``` Generate Splash and Onboarding screens for AI Tutor Flutter app: 1. lib/presentation/screens/splash/splash_screen.dart Beautiful animated splash with: - Animated gradient background (shifting colors) - App logo with scale + fade animation - Logo pulse/glow effect - App name "AI Tutor" with typing animation - Tagline "আপনার ব্যক্তিগত AI শিক্ষক" fade in - Lottie loading animation at bottom - Check auth state and navigate accordingly - Duration: 2-3 seconds 2. lib/presentation/screens/splash/widgets/animated_logo.dart - Scale animation - Rotation animation - Glow effect - Gradient border animation 3. lib/presentation/screens/onboarding/onboarding_screen.dart 3-4 page onboarding with: - PageView with smooth animations - Page 1: "AI শিক্ষক" - যেকোনো প্রশ্নের উত্তর পান - Page 2: "সব বিষয়" - গণিত, বিজ্ঞান, ইংরেজি - Page 3: "২৪/৭ সাহায্য" - যখন খুশি পড়ুন - Page 4: "শুরু করুন" - আজই শুরু করুন - Animated page indicator dots - Skip button (top right) - Next button with arrow animation - Get Started button on last page - Lottie animations for each page - Parallax effect on page swipe 4. lib/presentation/screens/onboarding/widgets/onboarding_page.dart 5. lib/presentation/screens/onboarding/widgets/page_indicator.dart Use flutter_animate package for smooth animations. Include all imports and complete code. ``` --- ### **COMMAND J: Authentication Screens** ``` Generate complete Authentication screens for AI Tutor Flutter app: 1. lib/presentation/screens/auth/login/login_screen.dart Beautiful login screen with: - Animated gradient background - App logo at top (animated) - "স্বাগতম!" welcome text with animation - "আপনার অ্যাকাউন্টে লগইন করুন" subtitle - Email TextField (with icon, validation) - Password TextField (with show/hide toggle) - Remember Me checkbox - Forgot Password link - Login Button (with loading state, gradient) - Divider with "অথবা" text - Google Sign-in button (with Google icon) - Facebook Sign-in button (optional) - "অ্যাকাউন্ট নেই? রেজিস্টার করুন" link - Form validation with error messages - Shake animation on error - Success animation on login 2. lib/presentation/screens/auth/login/widgets/login_form.dart 3. lib/presentation/screens/auth/login/widgets/social_login_buttons.dart 4. lib/presentation/screens/auth/register/register_screen.dart Registration screen with: - Full name TextField - Email TextField - Phone TextField (Bangladesh format) - Password TextField - Confirm Password TextField - Class/Grade dropdown - Terms & Conditions checkbox - Register Button - Already have account link - Form validation 5. lib/presentation/screens/auth/forgot_password/forgot_password_screen.dart - Email input - Send reset link button - Success/Error messages - Back to login Include all animations, validations, and Riverpod integration. ``` --- ### **COMMAND K: Home Screen** ``` Generate complete Home Screen for AI Tutor Flutter app: lib/presentation/screens/home/home_screen.dart Main home screen like ChatGPT/Gemini with: LAYOUT: - Scaffold with Drawer - Custom AppBar with menu icon, "AI Tutor" title, profile avatar - Responsive: Drawer on mobile, NavigationRail on tablet/desktop - FloatingActionButton for new chat EMPTY STATE (when no chat selected): - Centered animated AI logo - "আজ আপনাকে কিভাবে সাহায্য করতে পারি?" text - Animated gradient text - Quick action chips/cards: * "গণিত সমস্যা সমাধান করুন" 📐 * "ইংরেজি শিখুন" 📚 * "বিজ্ঞান বুঝুন" 🔬 * "প্রশ্ন জিজ্ঞাসা করুন" ❓ - Subject selection chips (animated) - Input field at bottom (like ChatGPT) WIDGETS: 1. lib/presentation/screens/home/widgets/home_app_bar.dart 2. lib/presentation/screens/home/widgets/welcome_section.dart 3. lib/presentation/screens/home/widgets/quick_actions.dart 4. lib/presentation/screens/home/widgets/subject_chips.dart 5. lib/presentation/screens/home/widgets/home_input_field.dart NAVIGATION DRAWER: 6. lib/presentation/widgets/navigation/app_drawer.dart - User profile header (photo, name, email) - New Chat button (prominent) - Search field - Chat history list grouped by date: * "আজ" * "গতকাল" * "আগের ৭ দিন" * "আগের ৩০ দিন" - Each chat item: icon, title, 3-dot menu - Settings link - Subscription link - Help link - Logout button 7. lib/presentation/widgets/navigation/drawer_header.dart 8. lib/presentation/widgets/navigation/chat_history_list.dart 9. lib/presentation/widgets/navigation/drawer_menu_item.dart Include all animations and responsive design. ``` --- ### **COMMAND L: Chat Screen (MOST IMPORTANT)** ``` Generate complete Chat Screen for AI Tutor Flutter app - this is the main feature: lib/presentation/screens/chat/chat_screen.dart LAYOUT: - AppBar: back button, chat title (editable), options menu (rename, share, delete) - Message list (ListView.builder, reversed for bottom-to-top) - Sticky input area at bottom - Safe area handling MESSAGE LIST: - User messages on right (colored bubble) - AI messages on left (with avatar) - Date separators - Smooth scroll - Scroll to bottom button (when scrolled up) - Pull to load more (older messages) WIDGETS: 1. lib/presentation/screens/chat/widgets/message_list.dart - ListView with animations - Staggered item animations - Date headers 2. lib/presentation/screens/chat/widgets/user_message_bubble.dart - Right aligned - Gradient background (green like ChatGPT) - Rounded corners (special shape) - Timestamp - Edit/Delete options on long press - Swipe to reply 3. lib/presentation/screens/chat/widgets/ai_message_bubble.dart - Left aligned - AI avatar (gradient circle with icon) - Light background (adapts to theme) - Markdown support: * Bold, italic, underline * Headings * Bullet lists, numbered lists * Code blocks with syntax highlighting * Tables * Links * Math equations (LaTeX) - Action buttons below: * 👍 Like (animated) * 👎 Dislike * 📋 Copy * 🔄 Regenerate * 📤 Share * 🔊 Read Aloud - Streaming text animation (word by word) 4. lib/presentation/screens/chat/widgets/typing_indicator.dart - Three bouncing dots animation - "AI Tutor টাইপ করছে..." text - Pulse effect 5. lib/presentation/screens/chat/widgets/chat_input_field.dart - Multi-line TextField (expandable) - Placeholder "আপনার প্রশ্ন লিখুন..." - Attachment button (📎) - opens image picker - Voice input button (🎤) - speech to text - Send button (arrow, animated) - Send button disabled when empty - Stop generation button (when AI responding) - Emoji button (optional) - Character count (optional) - Keyboard handling 6. lib/presentation/screens/chat/widgets/code_block.dart - Syntax highlighting - Language label - Copy code button - Line numbers (optional) 7. lib/presentation/screens/chat/widgets/markdown_renderer.dart - Complete markdown support - Custom styling - Link handling 8. lib/presentation/screens/chat/widgets/message_actions.dart - Action buttons row - Animated feedback on tap 9. lib/presentation/screens/chat/widgets/image_preview.dart - Display attached images - Tap to expand - Remove button Include complete Riverpod integration for: - Sending messages - Receiving streaming responses from Gemini - Loading states - Error handling Make it look and work exactly like ChatGPT! ``` --- ### **COMMAND M: Common Widgets & Animations** ``` Generate all common reusable widgets for AI Tutor Flutter app: 1. lib/presentation/widgets/common/custom_button.dart - Primary, Secondary, Tertiary variants - Gradient background option - Loading state with spinner - Disabled state - Icon support (left/right) - Full width option - Bounce animation on tap - Ripple effect 2. lib/presentation/widgets/common/custom_text_field.dart - Outlined and Filled variants - Prefix and suffix icons - Password visibility toggle - Error state with message - Label and hint - Character counter - Animated focus state - Validation support 3. lib/presentation/widgets/common/gradient_background.dart - Animated gradient (color shifting) - Multiple preset gradients - Custom gradient support - Performance optimized 4. lib/presentation/widgets/common/glassmorphism_card.dart - Frosted glass effect - Blur background - Subtle border - Works on light and dark theme 5. lib/presentation/widgets/common/shimmer_loading.dart - Shimmer effect for loading states - Configurable colors - Different shapes (rectangle, circle) 6. lib/presentation/widgets/common/loading_overlay.dart - Full screen loading - Lottie animation - Custom message 7. lib/presentation/widgets/common/empty_state.dart - Illustration/Lottie - Title and description - Action button 8. lib/presentation/widgets/common/error_widget.dart - Error illustration - Error message - Retry button 9. lib/presentation/widgets/common/fade_animation.dart 10. lib/presentation/widgets/common/slide_animation.dart 11. lib/presentation/widgets/common/scale_animation.dart 12. lib/presentation/widgets/common/bounce_animation.dart - Reusable animation wrappers - Using flutter_animate 13. lib/presentation/widgets/dialogs/confirm_dialog.dart - Icon at top - Title - Message - Cancel/Confirm buttons - Animated appearance - Destructive action style option 14. lib/presentation/widgets/sheets/chat_options_sheet.dart - Rename option - Pin option - Share option - Export option - Delete option (red) - Animated items Include all imports and make production-ready. ``` --- ### **COMMAND N: Settings & Profile Screens** ``` Generate Settings and Profile screens for AI Tutor Flutter app: 1. lib/presentation/screens/settings/settings_screen.dart Complete settings with sections: APPEARANCE: - Theme (Light ☀️ / Dark 🌙 / System 📱) - Accent color picker - Font size (Small/Medium/Large) LANGUAGE: - App language (বাংলা / English) - AI response language CHAT: - Save chat history (toggle) - Sound effects (toggle) - Haptic feedback (toggle) VOICE: - Voice input (toggle) - Voice output (toggle) - Speech speed slider NOTIFICATIONS: - Push notifications (toggle) - Daily reminder (toggle) PRIVACY: - Clear chat history (with confirmation) - Clear cache - Download my data ACCOUNT: - Change password - Delete account (with confirmation) ABOUT: - App version - Terms of Service - Privacy Policy - Rate app - Share app - Contact support 2. lib/presentation/screens/settings/widgets/settings_section.dart 3. lib/presentation/screens/settings/widgets/settings_tile.dart 4. lib/presentation/screens/settings/widgets/theme_selector.dart - Three options with icons - Animated selection - Preview of each theme 5. lib/presentation/screens/profile/profile_screen.dart - Cover photo - Profile picture (with edit button) - Name (editable) - Email - Phone - Class/Grade - Member since - Subscription badge STATS: - Total chats - Total questions - Learning streak - Animated counters ACHIEVEMENTS: - Badge grid - Locked/unlocked states 6. lib/presentation/screens/profile/widgets/profile_header.dart 7. lib/presentation/screens/profile/widgets/stats_section.dart 8. lib/presentation/screens/profile/widgets/edit_profile_sheet.dart Include all Riverpod providers and animations. ``` --- ### **COMMAND O: Subscription Screen** ``` Generate Subscription/Pricing screen for AI Tutor Flutter app: lib/presentation/screens/subscription/subscription_screen.dart Beautiful pricing page: HEADER: - Gradient background - Crown/Star icon - "প্রিমিয়াম আনলক করুন" title - "সীমাহীন শেখার সুযোগ পান" subtitle TOGGLE: - Monthly / Yearly switch - "২ মাস ফ্রি!" badge on yearly PRICING CARDS: FREE PLAN: - "ফ্রি" title - ৳০ - Features with checkmarks: * ✓ দৈনিক ১০টি প্রশ্ন * ✓ বেসিক বিষয়সমূহ * ✓ ৭ দিনের চ্যাট ইতিহাস * ✗ ভয়েস ইনপুট * ✗ ছবি আপলোড * ✗ বিজ্ঞাপন মুক্ত - Current Plan badge (if active) PREMIUM PLAN (Highlighted): - "প্রিমিয়াম" title with ⭐ - ৳৪৯/মাস or ৳৪৯৯/বছর - "সবচেয়ে জনপ্রিয়" badge - Glowing border animation - Features: * ✓ সীমাহীন প্রশ্ন * ✓ সব বিষয় * ✓ সীমাহীন চ্যাট ইতিহাস * ✓ ভয়েস ইনপুট * ✓ ছবি আপলোড * ✓ বিজ্ঞাপন মুক্ত * ✓ অগ্রাধিকার সাপোর্ট * ✓ কুইজ মোড - Subscribe button (gradient, animated) PAYMENT METHODS: - bKash (with logo) - Nagad (with logo) - Card (Visa/Master) FAQ: - Expandable FAQ items - Common subscription questions WIDGETS: 1. lib/presentation/screens/subscription/widgets/pricing_card.dart 2. lib/presentation/screens/subscription/widgets/feature_list.dart 3. lib/presentation/screens/subscription/widgets/payment_method_selector.dart Include all animations and make it visually appealing. ``` --- ### **COMMAND P: Router & Navigation** ``` Generate complete routing setup for AI Tutor Flutter app using GoRouter: 1. lib/core/router/route_names.dart - All route name constants - splash, onboarding, login, register, forgotPassword - home, chat, newChat, history - profile, settings, subscription - help, about 2. lib/core/router/app_router.dart Complete GoRouter configuration: - Splash screen as initial route - Auth flow (login, register, forgot) - Main flow (home, chat, history, etc.) - Redirect logic: * If not logged in → login * If logged in → home * If first time → onboarding - Path parameters (chat/:chatId) - Transition animations: * Fade for splash * Slide for screens * Modal for dialogs - Deep linking setup - Error handling (404 page) - Shell route for main layout Example structure: ```dart final router = GoRouter( initialLocation: '/', redirect: (context, state) { final isLoggedIn = ref.read(authProvider).isLoggedIn; final isOnboarded = ref.read(onboardingProvider).isCompleted; if (!isOnboarded) return '/onboarding'; if (!isLoggedIn) return '/login'; return null; }, routes: [ GoRoute(path: '/', builder: (_, __) => SplashScreen()), GoRoute(path: '/onboarding', builder: (_, __) => OnboardingScreen()), GoRoute(path: '/login', builder: (_, __) => LoginScreen()), ShellRoute( builder: (_, __, child) => MainShell(child: child), routes: [ GoRoute(path: '/home', builder: (_, __) => HomeScreen()), GoRoute(path: '/chat/:id', builder: (_, state) => ChatScreen( chatId: state.pathParameters['id'], )), // ... more routes ], ), ], ); ``` Include all imports and proper Riverpod integration. ``` --- ### **COMMAND Q: Main & App Files** ``` Generate main entry files for AI Tutor Flutter app: 1. lib/main.dart - Initialize Firebase - Initialize Hive - Setup error handling - Setup Riverpod ProviderScope - Run app 2. lib/app.dart - MaterialApp.router configuration - Theme setup (light/dark) - GoRouter integration - Localization setup (Bengali/English) - Responsive setup 3. lib/injection_container.dart - All dependency registration - Services - Repositories - Use cases - Using get_it or Riverpod providers Example main.dart: ```dart void main() async { WidgetsFlutterBinding.ensureInitialized(); // Firebase await Firebase.initializeApp( options: DefaultFirebaseOptions.currentPlatform, ); // Hive await Hive.initFlutter(); // Initialize services await initializeDependencies(); // Error handling FlutterError.onError = (details) { // Log error }; runApp( ProviderScope( child: AITutorApp(), ), ); } ``` Example app.dart: ```dart class AITutorApp extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { final themeMode = ref.watch(themeModeProvider); final router = ref.watch(routerProvider); return MaterialApp.router( title: 'AI Tutor BD', debugShowCheckedModeBanner: false, theme: AppTheme.lightTheme, darkTheme: AppTheme.darkTheme, themeMode: themeMode, routerConfig: router, // Localization... ); } } ``` Include all imports and Firebase options placeholder. ``` --- # 📋 **PART 4: HOW TO USE THESE COMMANDS** ## 🔄 Step-by-Step Process: ``` 1️⃣ Open Gemini (gemini.google.com or AI Studio) 2️⃣ Copy COMMAND A → Paste → Get pubspec.yaml Save file: ai_tutor_bd/pubspec.yaml 3️⃣ Run: flutter pub get 4️⃣ Copy COMMAND B → Paste → Get theme files Save to: lib/core/theme/ 5️⃣ Copy COMMAND C → Paste → Get utility files Save to: lib/core/ 6️⃣ Continue with COMMAND D, E, F... one by one 7️⃣ After each command, ask Gemini: "Continue with the next file" or "Give me the complete code for [specific file]" 8️⃣ If response is cut off, say: "Continue from where you stopped" ``` --- ## 💡 **IMPORTANT TIPS** ``` ✅ DO: - Use one command at a time - Save each file immediately - Run "flutter pub get" after pubspec.yaml - Test frequently - Ask for specific files if needed ❌ DON'T: - Don't paste all commands at once - Don't skip any files - Don't ignore errors ``` --- ## 🎯 **QUICK START COMMAND** ### যদি শুধু একটা Command দিয়ে সব চান: ``` You are an expert Flutter developer. Create a COMPLETE, PRODUCTION-READY AI Tutor application for all platforms (Android, iOS, Web, Windows, macOS, Linux). The app should be exactly like ChatGPT and Gemini combined with: - Beautiful animated UI (gradients, glassmorphism, smooth animations) - Firebase authentication (email, Google sign-in) - Firestore database for chat storage - Google Gemini API for AI responses - Riverpod for state management - GoRouter for navigation - Bengali language support - Dark/Light theme Start by generating the COMPLETE pubspec.yaml with ALL dependencies. Then I will ask for each file one by one. ``` --- ## 📱 **FINAL CHECKLIST** ``` □ Flutter installed ✓ □ Android Studio with Flutter plugin ✓ □ Firebase project created ✓ □ Gemini API key obtained ✓ □ Project created (flutter create) ✓ □ All commands executed ✓ □ All files saved ✓ □ flutter pub get successful ✓ □ No compilation errors ✓ □ App runs on emulator ✓ ``` --- আপনি এখন শুরু করতে পারেন! প্রথমে **COMMAND A** দিয়ে pubspec.yaml নিন, তারপর আমাকে জানান। আমি আপনাকে পরবর্তী Step এ Guide করব! 🚀
Share This
About author: Full Movie (HD)
Cress arugula peanut tigernut wattle seed kombu parsnip. Lotus root mung bean arugula tigernut horseradish endive yarrow gourd. Radicchio cress avocado garlic quandong collard greens.
Subscribe to:
Post Comments (Atom)

0 comments: