Skip to the content.

🛠 Development Guide

Prerequisites

Getting Started

  1. Clone the repository:
    git clone <repository-url>
    cd attd
    
  2. Install dependencies:
    flutter pub get
    
  3. Google OAuth Setup:
    • Obtain Android, iOS, and Web Client IDs from the Google Cloud Console.
    • Replace placeholders in android/app/src/main/res/values/strings.xml and ios/Runner/Info.plist with your actual Client IDs.

Build Configuration

This project uses --dart-define to inject Client IDs at build time.

flutter run \
  --dart-define=GOOGLE_ANDROID_CLIENT_ID=your_android_client_id.apps.googleusercontent.com \
  --dart-define=GOOGLE_IOS_CLIENT_ID=your_ios_client_id.apps.googleusercontent.com \
  --dart-define=GOOGLE_WEB_CLIENT_ID=your_web_client_id.apps.googleusercontent.com

Testing Strategy

1. Static Analysis

Run the linter to ensure code style consistency:

flutter analyze

2. Unit & Widget Tests

Execute the primary test suite:

flutter test --coverage
dart run tool/check_coverage.dart

The coverage check reads coverage/lcov.info, sums LCOV LH and LF line totals, and enforces a 66.9% minimum line coverage baseline. Raise the threshold in tool/check_coverage.dart as follow-up coverage work lands.

3. Integration Tests

Run comprehensive end-to-end scenarios (requires a running emulator or physical device):

flutter test integration_test/app_test.dart

4. Golden Screenshots

Update the visual regression tests and generate screenshots for marketing:

flutter test --update-goldens test/store_screenshots_test.dart

CI/CD Pipeline

We use GitHub Actions for automated testing.


Refer to Architecture for a deep dive into the code structure.