Skip to main content

Prerequisites

Before you begin, ensure you have the following installed on your development machine:

Flutter SDK

Version 3.5.4 or higher

Dart SDK

Included with Flutter

Android Studio

For Android development and emulators

Git

For cloning the repository

Environment Setup

Install Flutter

1

Download Flutter SDK

Download the Flutter SDK from the official website:
# macOS/Linux
git clone https://github.com/flutter/flutter.git -b stable

# Add to PATH
export PATH="$PATH:`pwd`/flutter/bin"
2

Verify Installation

Run Flutter doctor to check your installation:
flutter doctor
This will check your environment and display a report of the status of your Flutter installation.
3

Accept Android Licenses

If you’re developing for Android:
flutter doctor --android-licenses

System Requirements

  • Min SDK: 21 (Android 5.0 Lollipop)
  • Target SDK: Latest
  • Android Studio: Arctic Fox or newer
  • Build Tools: Latest version

Clone the Repository

1

Clone Repository

Clone the Aradia Audiobooks repository:
git clone https://github.com/sagarchaulagai/aradia.git
cd aradia
2

Check Dependencies

Review the pubspec.yaml to understand project dependencies:
pubspec.yaml
name: aradia
version: 3.0.0

environment:
  sdk: ^3.5.4

dependencies:
  flutter:
    sdk: flutter
  
  # State Management
  bloc: ^9.0.0
  flutter_bloc: ^9.1.1
  provider: ^6.1.2
  
  # Navigation
  go_router: ^16.2.1
  
  # Local Storage
  hive: ^2.2.3
  hive_flutter: ^1.1.0
  path_provider: ^2.1.5
  
  # Audio
  audio_service: ^0.18.18
  just_audio:
    git:
      url: https://github.com/sagarchaulagai/just_audio.git
      path: just_audio
      ref: a6f8db8ded43bdff0e39766fbbdbab8f22cadc2c
  just_audio_background: ^0.0.1-beta.17
  rxdart: ^0.28.0
  
  # UI & Utilities
  cached_network_image: ^3.4.1
  google_fonts: ^6.2.1
  transparent_image: ^2.0.1
  audio_video_progress_bar: ^2.0.3
  we_slide: ^2.4.0
  
  # Downloads
  background_downloader: ^9.2.4
  permission_handler: ^12.0.1
  
  # Network
  http: ^1.2.2
  connectivity_plus: ^7.0.0
  
  # YouTube Support
  youtube_explode_dart:
    git:
      url: https://github.com/sheikhhaziq/youtube_explode_dart.git
  flutter_inappwebview: ^6.1.5
  
  # ChromeCast
  flutter_chrome_cast: ^1.2.5

Install Dependencies

1

Get Flutter Packages

Install all Flutter dependencies:
flutter pub get
This will download all packages specified in pubspec.yaml.
2

Run Code Generation (if needed)

Some dependencies like Hive require code generation:
flutter pub run build_runner build --delete-conflicting-outputs
This step is only needed if you modify Hive models or other generated code.
3

Verify Dependencies

Check that all dependencies are properly installed:
flutter pub deps

Build the Application

Development Build

1

Connect Device or Start Emulator

Connect an Android device via USB or start an Android emulator:
# List available devices
flutter devices

# Start an emulator
flutter emulators --launch <emulator_id>
2

Run in Debug Mode

Run the app in debug mode:
flutter run
Or specify a device:
flutter run -d <device_id>
3

Hot Reload During Development

While the app is running, you can:
  • Press r to hot reload
  • Press R to hot restart
  • Press q to quit

Production Build

Build a release APK:
flutter build apk --release
The APK will be available at:
build/app/outputs/flutter-apk/app-release.apk
For a smaller APK, build split APKs per ABI:
flutter build apk --split-per-abi --release

Configuration

App Icon

The app uses adaptive icons for Android. Icon assets are located in:
pubspec.yaml
flutter_launcher_icons:
  android: true
  ios: false
  
  adaptive_icon_foreground: assets/icon/fg.png
  adaptive_icon_background: "#FF7A00"
  adaptive_icon_monochrome: assets/icon/mono.png
  image_path_android: assets/icon/legacy.png
  
  min_sdk_android: 21
To generate new icons:
flutter pub run flutter_launcher_icons:main

Assets

App assets are defined in pubspec.yaml:
pubspec.yaml
flutter:
  uses-material-design: true
  
  assets:
    - assets/icon.png
    - assets/language_subjects.txt

Troubleshooting

Run flutter doctor and ensure all required SDKs are installed:
flutter doctor -v
Make sure Android SDK and platform tools are properly configured.
Clean and rebuild the project:
flutter clean
flutter pub get
flutter build apk
Update CocoaPods and reinstall:
cd ios
pod deintegrate
pod install
cd ..
Some dependencies use git repositories. Ensure git is configured:
git config --global url."https://".insteadOf git://
The app requires storage permissions for downloads. Ensure permissions are granted in device settings or use:
adb shell pm grant com.oseamiya.librivoxaudiobook android.permission.WRITE_EXTERNAL_STORAGE

Development Tools

Flutter

Official Flutter extension for VS Code

Dart

Official Dart language support

Bloc

BLoC snippets and utilities

Pubspec Assist

Easy package management

Debugging

1

Enable Debug Mode

Run the app in debug mode to use DevTools:
flutter run --debug
2

Open DevTools

Launch Flutter DevTools for debugging:
flutter pub global activate devtools
flutter pub global run devtools
3

View Logs

Monitor app logs in real-time:
flutter logs

Performance Optimization

Profile Build

To analyze performance, build in profile mode:
flutter run --profile
This enables performance profiling while maintaining near-release performance.

Analyze Code

Run static analysis to find potential issues:
flutter analyze

Next Steps

Architecture

Understand the app architecture

State Management

Learn about BLoC and Provider patterns

Contributing

Start contributing to the project

Build docs developers (and LLMs) love