Skip to main content

Prerequisites

Before installing Vitu, ensure you have the following installed:
1

Install Flutter SDK

Download and install Flutter SDK from flutter.devVitu requires Flutter SDK with Dart ^3.10.8Verify your installation:
flutter --version
flutter doctor
2

Set up platform tools

Install the required tools for your target platform:For Android:
  • Android Studio with Android SDK
  • Android SDK Platform-Tools
  • Android Emulator or physical device
For iOS (macOS only):
  • Xcode 12.0 or later
  • CocoaPods
  • iOS Simulator or physical device
For Desktop (optional):
  • Windows: Visual Studio 2022 with C++ tools
  • macOS: Xcode command line tools
  • Linux: clang, cmake, ninja-build, libgtk-3-dev
3

Verify platform setup

Run Flutter doctor to ensure all requirements are met:
flutter doctor -v
Fix any issues reported before proceeding.

Install Vitu

1

Clone the repository

Clone the Vitu repository from GitHub:
git clone https://github.com/<your-username>/VidaSaludable.git
cd VidaSaludable
2

Install dependencies

Install all Flutter package dependencies:
flutter pub get
This will install the following packages:
  • hive and hive_flutter - Local NoSQL database
  • google_generative_ai - Gemini AI integration
  • image_picker - Camera and gallery access
  • geolocator - Location services
  • sensors_plus - Device sensors (accelerometer)
  • fl_chart - Data visualization
  • path_provider - File system paths
  • shared_preferences - Simple key-value storage
  • screen_state - Screen state detection
3

Configure platform permissions

The app requires specific permissions to function properly. These are already configured in the source files.Android permissions (in android/app/src/main/AndroidManifest.xml):
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
iOS permissions (in ios/Runner/Info.plist):
<key>NSLocationWhenInUseUsageDescription</key>
<string>Necesitamos ubicación para contar pasos y detectar actividad</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Necesitamos ubicación para contar pasos y detectar actividad</string>
Camera permissions are handled automatically by the image_picker plugin.
4

Set up Gemini API key

Never commit your API key to version control. Use environment variables or a local configuration file that is ignored by Git.
  1. Get a Gemini API key from Google AI Studio
  2. See the Configuration page for secure setup options
For now, you can temporarily add it directly in lib/main.dart:489 (not recommended for production):
const apiKey = 'YOUR_API_KEY_HERE';
5

Verify installation

Test that everything is set up correctly:
flutter analyze
This should complete without errors.

Platform-Specific Setup

Android

Vitu uses Android Gradle Plugin 8+ and requires:
  • Minimum SDK: API 21 (Android 5.0)
  • Target SDK: Latest stable
No additional configuration is required beyond the standard Flutter setup.

iOS

For iOS development:
1

Install CocoaPods dependencies

cd ios
pod install
cd ..
2

Configure code signing

Open ios/Runner.xcworkspace in Xcode and configure your development team in the Signing & Capabilities tab.

Desktop Platforms

Vitu supports Windows, macOS, and Linux. Desktop builds work out of the box once Flutter desktop is enabled:
flutter config --enable-windows-desktop
flutter config --enable-macos-desktop
flutter config --enable-linux-desktop
Some features like step counting and location tracking may have limited functionality on desktop platforms.

Next Steps

Once installation is complete, proceed to the Quickstart guide to run Vitu for the first time.

Build docs developers (and LLMs) love