mirror of
https://github.com/Dvorinka/1356.git
synced 2026-06-03 19:42:57 +00:00
3.0 KiB
3.0 KiB
Flutter Development Setup Guide
Quick Start (Linux Machine)
-
Copy project to Linux machine:
# If using scp from Windows to Linux scp -r w:\Downloads\PROG+HTML\1356 user@linux-machine:/path/to/ # Or use rsync rsync -av /w/Downloads/PROG+HTML/1356/ user@linux-machine:/path/to/1356/ -
Navigate to project:
cd /path/to/1356/lifetimer -
Install dependencies:
flutter pub get -
Run the app:
# With emulator flutter run # Or build APK flutter build apk --debug
Changes Made Summary
✅ Fixed Issues:
- JSON Coercion Error: Added null safety in
mistral_ai_service.dart - Privacy Mode: Changed default to
falsefor better AI personalization - Account Creation: Added optional height/weight fields
- AI Formatting: Added markdown rendering for better text display
- Loading Status: Added "AI is thinking..." indicator in chat
📦 Dependencies Added:
flutter_markdown: ^0.7.3for formatted AI responses
🔧 Modified Files:
lib/features/ai_chat/application/ai_chat_controller.dartlib/features/ai_chat/presentation/ai_chat_screen.dartlib/data/services/mistral_ai_service.dartlib/data/models/user_model.dartlib/features/auth/presentation/sign_up_screen.dartlib/data/repositories/auth_repository.dartlib/features/auth/application/auth_controller.dartpubspec.yaml
Testing the Changes
On Linux Machine:
# 1. Get dependencies
flutter pub get
# 2. Check for any analysis issues
flutter analyze
# 3. Run tests
flutter test
# 4. Run the app
flutter run
# 5. Or build for testing
flutter build apk --debug
Manual Testing Checklist:
- Sign up with optional height/weight fields
- Verify AI chat shows formatted responses
- Check loading indicator appears when AI responds
- Confirm privacy mode is off by default
- Test that JSON errors no longer occur
Flutter Installation (Linux)
If you need to install Flutter on Linux:
# Download Flutter
wget https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.19.6-stable.tar.xz
# Extract
tar xf flutter_linux_3.19.6-stable.tar.xz
# Add to PATH
export PATH="$PATH:`pwd`/flutter/bin"
# Verify installation
flutter doctor
# Install dependencies (Ubuntu/Debian)
sudo apt-get update
sudo apt-get install -y curl git unzip xz-utils libglu1-mesa
Project Structure
lifetimer/
├── lib/
│ ├── features/
│ │ ├── ai_chat/
│ │ ├── auth/
│ │ └── ...
│ ├── data/
│ │ ├── models/
│ │ ├── services/
│ │ └── ...
│ └── ...
├── pubspec.yaml
└── ...
The changes are ready to test once you run them on your Linux machine!