Configuration and Environment

This section details how to configure the application to connect to the necessary backend services.

Backend Server URL

The application connects to a backend service that proxies requests to the D-ID API and handles the real-time transcription. You need to configure the URL for this service.

  1. Open the file lib/app/constants/constant.dart.

  2. Modify the kServerUrl variable to point to your backend endpoint.

Dart

Copy

// lib/app/constants/constant.dart
const String kServerUrl = String.fromEnvironment(
  'SERVER_URL',
  defaultValue: 'https://api.deepfake.petaproc.com', // <-- CHANGE THIS
);

Running with Command-Line Arguments

For easier switching between development, staging, and production environments, you can override this URL when running the app from the command line:

Bash

Copy

# Example for running against a local server
flutter run --dart-define=SERVER_URL=http://localhost:4000

API Keys

The current implementation expects the backend server to manage the D-ID API key securely. The Flutter application authenticates with the backend, which then uses the API key for subsequent requests to D-ID. There are no API keys stored directly in the Flutter application code.

Last updated