📋 Application Overview
What is Aethel?
Aethel is a modern, feature-rich task management application built with Flutter. It provides smart organization, premium features, and multi-language support with a beautiful, responsive UI.
Key Features
✅ Task Management
Create, organize, and track tasks with smart categorization and energy levels
🌍 Multi-Language
Full RTL/LTR support for Arabic, English, French, and Spanish
💎 Premium Features
In-app subscriptions with monthly, quarterly, and yearly plans
📊 Activity Tracking
Monitor productivity with detailed statistics and insights
🔒 Security
Biometric authentication and app lock features
💰 Monetization
Google AdMob integration with banner and interstitial ads
Technical Stack
| Technology | Version | Purpose |
|---|---|---|
| Flutter SDK | 3.9.2+ | Cross-platform framework |
| Dart | 3.9.2+ | Programming language |
| Riverpod | 3.0.3 | State management |
| Hive | 2.2.3 | Local database |
| Google Mobile Ads | 7.0.0 | Ad monetization |
| In-App Purchase | 3.2.3 | Subscription management |
🏗️ Application Architecture
Project Structure
aethel/
├── android/ # Android platform code
│ ├── app/
│ │ ├── build.gradle.kts # Build configuration
│ │ └── src/main/
│ │ └── AndroidManifest.xml
│ └── key.properties # Signing keys (not in git)
├── ios/ # iOS platform code
├── lib/ # Flutter application code
│ ├── l10n/ # Localization files
│ ├── main.dart # App entry point
│ └── src/
│ ├── core/ # Core functionality
│ │ ├── theme/ # App theming
│ │ ├── localization/ # Language support
│ │ └── services/ # Core services
│ ├── features/ # Feature modules
│ │ ├── tasks/ # Task management
│ │ ├── premium/ # Subscription features
│ │ ├── ads/ # Advertisement
│ │ ├── settings/ # App settings
│ │ └── activity/ # Activity tracking
│ └── shared/ # Shared widgets
├── assets/ # Application assets
│ └── icon/ # App icons
├── pubspec.yaml # Dependencies
└── flutter_launcher_icons.yaml
How the Application Works
1. Initialization Flow
- main.dart - Entry point that initializes Flutter
- Hive Database - Opens local storage for tasks and settings
- Services - Initializes ads, notifications, and tracking
- Splash Screen - Shows while loading (3 seconds minimum)
- Dashboard - Main screen with task list
2. State Management (Riverpod)
The app uses Riverpod for state management. Key providers include:
taskListProvider- Manages all taskssubscriptionControllerProvider- Handles premium statusadsServiceProvider- Controls ad displaythemeControllerProvider- Theme switchinglanguageControllerProvider- Language selection
3. Data Persistence
Uses Hive (NoSQL database) for local storage:
- Tasks Box - Stores all user tasks
- Settings Box - Stores preferences
- Activity Box - Stores usage statistics
⚙️ Application Configuration
🚀 NEW: Centralized Configuration
We have centralized the most common settings in one file for your convenience.
To change App Name, Support Email, Website, Colors, Ad IDs, and Subscription IDs, simply edit:
class AppConfig {
static const String appName = 'My App';
static const String supportEmail = 'support@myapp.com';
// ... Ads and Subscription IDs are also here!
}
1. Change Application Name (System)
1. Change Application Name
Step 1: Update pubspec.yaml
name: aethel # Change this to your app name (lowercase, no spaces)
description: "Your app description here"
Step 2: Update Android Manifest
<application
android:label="Your App Name" <!-- Change this -->
android:icon="@mipmap/ic_launcher">
Step 3: Update iOS Info.plist
<key>CFBundleName</key>
<string>Your App Name</string>
2. Change Package Name (Application ID)
com.oubaali.aethel
Step 1: Update build.gradle.kts
android {
namespace = "com.yourcompany.yourapp" // Change this
defaultConfig {
applicationId = "com.yourcompany.yourapp" // Change this
minSdk = flutter.minSdkVersion
targetSdk = 36
versionCode = flutter.versionCode
versionName = flutter.versionName
}
}
Step 2: Update AndroidManifest.xml
No changes needed - it uses the applicationId from build.gradle
Step 3: Rename Package Directories
Rename the directory structure:
From: android/app/src/main/kotlin/com/oubaali/aethel/
To: android/app/src/main/kotlin/com/yourcompany/yourapp/
Step 4: Update MainActivity.kt
package com.yourcompany.yourapp // Change this
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity() {
}
3. Change Application Version
Update pubspec.yaml
version: 1.0.1+4
# Format: MAJOR.MINOR.PATCH+BUILD_NUMBER
# Example: 2.0.0+5
# - 2.0.0 = Version shown to users
# - 5 = Build number (must increase for each upload)
Version Number Rules:
- Major - Breaking changes (1.0.0 → 2.0.0)
- Minor - New features (1.0.0 → 1.1.0)
- Patch - Bug fixes (1.0.0 → 1.0.1)
- Build Number - Must increase for each Google Play upload
💰 Google AdMob Configuration
Current Ad Implementation
The app uses Google Mobile Ads SDK 7.0.0 with:
- Banner Ads - Displayed on Dashboard and Drawer
- Interstitial Ads - Shown every 5 task completions
- Test Ads - Currently using Google's test ad units
Step 1: Create AdMob Account
- Go to https://admob.google.com
- Sign in with your Google account
- Click "Get Started" and complete registration
- Create a new app in AdMob console
Step 2: Get Your Ad Unit IDs
In AdMob Console:
- Select your app
- Go to "Ad units"
- Create ad units for:
- Banner Ad
- Interstitial Ad
- Copy the Ad Unit IDs (format: ca-app-pub-XXXXXXXXXXXXXXXX/YYYYYYYYYY)
Step 3: Update AndroidManifest.xml
<!-- Replace with YOUR AdMob App ID -->
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-XXXXXXXXXXXXXXXX~YYYYYYYYYY"/>
Step 4: Update Ad Unit IDs in Code
We have moved ad configuration to AppConfig for easier access.
class AppConfig {
// Ads Configuration
static const bool adsEnabled = true;
// Android
static const String adMobAppIdAndroid = 'ca-app-pub-XXXXXXXXXXXXXXXX~YYYYYYYYYY';
static const String bannerAdUnitIdAndroid = 'ca-app-pub-XXXXXXXXXXXXXXXX/YYYYYYYYYY';
static const String interstitialAdUnitIdAndroid = 'ca-app-pub-XXXXXXXXXXXXXXXX/AAAAAAAAAA';
// iOS
static const String adMobAppIdiOS = 'ca-app-pub-XXXXXXXXXXXXXXXX~ZZZZZZZZZZ';
static const String bannerAdUnitIdiOS = 'ca-app-pub-XXXXXXXXXXXXXXXX/BBBBBBBBBB';
static const String interstitialAdUnitIdiOS = 'ca-app-pub-XXXXXXXXXXXXXXXX/CCCCCCCCCC';
}
Step 5: Test Your Ads
Testing Checklist:
- Build and run the app
- Check if banner ads appear on Dashboard
- Complete 5 tasks to trigger interstitial ad
- Verify ads load without errors
Ad Display Logic
Ads are hidden for premium users:
- Free users see all ads
- Premium subscribers see no ads
- Controlled by
shouldShowAdsproperty
💎 In-App Subscriptions Setup
Current Subscription Plans
| Plan | Product ID | Duration |
|---|---|---|
| Monthly | premium_monthly | 1 month |
| Quarterly | premium_quarterly | 3 months |
| Yearly | premium_yearly | 12 months |
Step 1: Configure Google Play Console
- Upload your app to Google Play Console (see Deployment section)
- Go to Monetize → Products → Subscriptions
- Click "Create subscription"
Step 2: Create Subscription Products
For each subscription plan, configure:
- Product ID: Must match code (e.g., premium_monthly)
- Name: Premium Monthly Subscription
- Description: Access all premium features
- Billing Period: 1 month / 3 months / 1 year
- Price: Set your price (e.g., $4.99, $11.99, $39.99)
Step 3: Change Subscription Prices
To change prices:
- Go to Google Play Console
- Navigate to Monetize → Subscriptions
- Select the subscription product
- Click "Edit" on the price
- Set new price and save
- Changes take effect immediately
Step 4: Update Product IDs
Update the IDs to match your Google Play Console products:
class AppConfig {
// Subscription Configuration
static const String premiumMonthlyId = 'your_monthly_id';
static const String premiumYearlyId = 'your_yearly_id';
}
Step 5: Link Payment Method with Google Play
For Automatic Payments via Google Play:
- Go to Google Play Console
- Select your app
- Navigate to Monetize → Payments profile
- Click "Set up payments profile"
- Enter your business information
- Add payment method (bank account for receiving payments)
- Verify your identity and tax information
- Wait for Google approval (can take 1-3 days)
- Valid business or personal Google Payments account
- Bank account for receiving payments
- Tax information (varies by country)
- Identity verification documents
Testing Subscriptions
Test Purchases:
- Add test accounts in Google Play Console
- Go to Settings → License testing
- Add Gmail accounts for testing
- These accounts can make test purchases without being charged
🖼️ Changing Application Images
1. App Icon
Current Icon Location
Step 1: Prepare Your Icon
Icon Requirements:
- Size: 1024x1024 pixels (minimum)
- Format: PNG with transparency
- Shape: Square (launcher will apply shape)
- Content: Keep important content in center 80%
Step 2: Replace Icon File
- Replace
assets/icon/app_icon.pngwith your new icon - Keep the same filename or update
flutter_launcher_icons.yaml
Step 3: Update flutter_launcher_icons.yaml
flutter_launcher_icons:
android: true
ios: true
image_path: "assets/icon/app_icon.png" # Your icon path
adaptive_icon_background: "#ffffff" # Background color
adaptive_icon_foreground: "assets/icon/app_icon.png"
Step 4: Generate Icons
# Run this command in terminal
flutter pub get
flutter pub run flutter_launcher_icons
✅ Icons will be automatically generated for all required sizes on Android and iOS
2. Splash Screen
The app uses a custom splash screen widget. To modify:
You can:
- Change background gradient colors
- Add a logo image
- Modify animation effects
- Change loading indicator style
3. Other Images in App
To add more images to your app:
- Place images in
assets/images/folder - Update
pubspec.yaml:flutter: assets: - assets/icon/ - assets/images/ # Add this line - Use in code:
Image.asset('assets/images/your_image.png')
🔒 Privacy Policy
We have included a ready-to-use Privacy Policy template for your app.
Using the Template
- Open 📁 privacy_policy_template.mdin the project root.
- Replace the placeholders:
[APP_NAME][DEVELOPER_NAME][SUPPORT_EMAIL][ADMOB_PUBLISHER_ID]
- Export as PDF or host it on a website (e.g., GitHub Pages) to use as your Play Store Privacy Policy URL.
🚀 Deployment to Google Play Store
Prerequisites
- ✅ Google Play Developer Account ($25 one-time fee)
- ✅ App signing key (keystore file)
- ✅ All configurations completed
- ✅ App tested thoroughly
Step 1: Create Signing Key
Generate Keystore
# Run in terminal (Windows)
keytool -genkey -v -keystore d:\app\aethel\android\upload-keystore.jks ^
-storetype JKS -keyalg RSA -keysize 2048 -validity 10000 ^
-alias upload
# You'll be asked for:
# - Keystore password (remember this!)
# - Key password (can be same as keystore)
# - Your name, organization, etc.
Step 2: Configure Signing
Create key.properties
storePassword=your_keystore_password
keyPassword=your_key_password
keyAlias=upload
storeFile=upload-keystore.jks
Step 3: Build Release APK/AAB
Build App Bundle (Recommended)
# App Bundle is smaller and optimized for Google Play
flutter build appbundle --release
Build APK (Alternative)
# APK for direct distribution
flutter build apk --release
Output Locations:
- App Bundle:
build/app/outputs/bundle/release/app-release.aab - APK:
build/app/outputs/flutter-apk/app-release.apk
Step 4: Upload to Google Play Console
- Create App:
- Go to Google Play Console
- Click "Create app"
- Fill in app details (name, language, type)
- Set Up App:
- Complete all required sections in Dashboard
- Privacy Policy URL (required)
- App category and content rating
- Target audience
- Upload Release:
- Go to Production → Releases
- Click "Create new release"
- Upload your .aab file
- Add release notes
- Store Listing:
- Add app description (short & full)
- Upload screenshots (minimum 2)
- Add feature graphic (1024x500)
- Upload app icon (512x512)
- Submit for Review:
- Review all sections
- Click "Send for review"
- Wait for approval (typically 1-3 days)
App Signing by Google Play
Recommended: Use Google Play App Signing
- Google manages your app signing key
- You upload with an upload key
- More secure and allows key recovery
- Enabled automatically for new apps
Update Existing App
- Increase version number in
pubspec.yaml - Build new release:
flutter build appbundle --release - Go to Production → Releases
- Create new release and upload .aab
- Submit for review
🔧 Common Issues & Solutions
Build Errors
Error: "Execution failed for task ':app:processReleaseResources'"
Cause: Resource conflicts or invalid AndroidManifest.xml
Solution:
# Clean build
flutter clean
flutter pub get
flutter build appbundle --release
Error: "Keystore file not found"
Cause: key.properties points to wrong location
Solution:
- Verify keystore file exists at specified path
- Use absolute path in key.properties
- Check file permissions
Error: "Gradle build failed with exit code 1"
Cause: Various Gradle configuration issues
Solutions:
# Update Gradle wrapper
cd android
./gradlew wrapper --gradle-version=8.0
# Clear Gradle cache
./gradlew clean
# Rebuild
cd ..
flutter clean
flutter pub get
flutter build appbundle
Ad Issues
Ads not showing
Possible Causes & Solutions:
- Test ads: Make sure you're using correct test ad unit IDs
- AdMob App ID: Verify it's correctly set in AndroidManifest.xml
- Internet: Check device has internet connection
- Premium status: Ads hidden for premium users
- Ad initialization: Check logs for initialization errors
Error: "Ad failed to load: 3"
Cause: No ad inventory available
Solution:
- Normal for test ads occasionally
- Try again after a few minutes
- Verify ad unit IDs are correct
In-App Purchase Issues
Products not loading
Checklist:
- ✅ App uploaded to Google Play (at least internal testing)
- ✅ Subscription products created in Play Console
- ✅ Product IDs match exactly (case-sensitive)
- ✅ Products are "Active" in Play Console
- ✅ App signed with same key as uploaded version
- ✅ Test account added to license testers
Error: "BillingClient is not ready"
Solution:
- Wait a few seconds after app launch
- Check internet connection
- Verify Google Play Services is updated
- Clear Google Play Store cache
Version Issues
Error: "Version code X has already been used"
Cause: Build number not increased
Solution:
# In pubspec.yaml, increase build number
version: 1.0.1+4 # Change to 1.0.1+5 or higher
Runtime Errors
Error: "MissingPluginException"
Cause: Plugin not properly registered
Solution:
flutter clean
flutter pub get
# Rebuild the app completely
App crashes on startup
Debug steps:
- Check logs:
flutter logs - Run in debug mode:
flutter run - Check Hive initialization
- Verify all required permissions in AndroidManifest
Google Play Console Issues
Upload rejected: "You need to use a different package name"
Cause: Package name already used by another app
Solution: Change package name (see Configuration section)
App stuck in "Pending publication"
Possible reasons:
- Review in progress (wait 1-3 days)
- Missing required information
- Policy violations detected
- Check email for Google notifications
🛠️ Required Tools & Software
Essential Development Tools
| Tool | Version | Download Link | Purpose |
|---|---|---|---|
| Flutter SDK | 3.9.2+ | flutter.dev | Framework for building the app |
| Android Studio | Latest | developer.android.com | IDE and Android SDK |
| VS Code | Latest | code.visualstudio.com | Lightweight code editor (optional) |
| Git | Latest | git-scm.com | Version control |
| Java JDK | 17 | oracle.com | Required for Android builds |
Installation Guide
1. Install Flutter
- Download Flutter SDK from flutter.dev
- Extract to
C:\src\flutter(Windows) - Add to PATH:
C:\src\flutter\bin - Verify installation:
flutter doctor
2. Install Android Studio
- Download from developer.android.com
- Install with default settings
- Open Android Studio
- Install Android SDK (API 36 recommended)
- Install Flutter and Dart plugins
3. Setup Android SDK
- Open Android Studio → Settings → Appearance & Behavior → System Settings → Android SDK
- Install:
- Android SDK Platform 36
- Android SDK Build-Tools
- Android SDK Command-line Tools
- Accept licenses:
flutter doctor --android-licenses
4. Verify Setup
flutter doctor -v
# Should show:
# ✓ Flutter (Channel stable, 3.x.x)
# ✓ Android toolchain
# ✓ Android Studio
# ✓ Connected device
VS Code Extensions (Optional)
- Flutter - Official Flutter extension
- Dart - Dart language support
- Flutter Widget Snippets - Code snippets
- Pubspec Assist - Dependency management
Useful Commands
| Command | Purpose |
|---|---|
flutter doctor |
Check Flutter installation |
flutter pub get |
Install dependencies |
flutter clean |
Clean build files |
flutter run |
Run app in debug mode |
flutter build apk |
Build release APK |
flutter build appbundle |
Build release App Bundle |
flutter analyze |
Check code for issues |
flutter logs |
View app logs |