Skip to content

Getting Started

Prerequisites

Tool Version Purpose
Flutter SDK >3.41.0 Framework
Dart SDK ^3.9.2 Language
Android Studio / Xcode Latest Platform toolchains
Supabase Project Active Backend (get URL and anon key)
Firebase Project Active FCM push notifications

Setup

1. Clone and install dependencies

git clone https://github.com/anomalyco/pharmanet.git
cd pharmanet/pharmanet
flutter pub get

2. Configure Supabase

Create lib/core/config/app_config.dart:

class AppConfig {
  static const String supabaseUrl = 'https://your-project.supabase.co';
  static const String supabaseAnonKey = 'your-anon-key';
}

3. Configure Firebase

# Download google-services.json (Android) / GoogleService-Info.plist (iOS)
# Place in android/app/ and ios/Runner/ respectively

flutterfire configure
# Updates firebase_options.dart automatically

4. Run code generation

flutter pub run build_runner build --delete-conflicting-outputs

Generates .freezed.dart and .g.dart files for all models.

5. Run the app

# For a specific platform
flutter run -d android
flutter run -d ios
flutter run -d chrome  # web

# With debug logging
flutter run --dart-define=FLUTTER_LOG_LEVEL=debug

Environment Configuration

Environment Variable File Purpose
Supabase URL app_config.dart Database and auth endpoint
Supabase Anon Key app_config.dart Client-side API key
FCM Server Key Supabase Secrets Push notification server key
Chapa Public Key payment_config.dart Payment gateway
Cloudinary URL chat_api.dart Image upload for chat

Verification

# Run tests
flutter test

# Run static analysis
flutter analyze

# Passes with 0 errors, 0 warnings