Skip to content

Mobile App Documentation ​

TaskFlow is built using Flutter, offering a high-performance experience across Android, iOS, and the Web. This guide will help you set up the development environment, connect to the backend, and build your app for release.


Technical Requirements ​

Ensure your development machine has the following:

  • Flutter SDK: Version 3.19.0 or higher.
  • Dart SDK: Automatically included with Flutter.
  • IDE: Visual Studio Code (recommended) or Android Studio.
  • Native Tools:
    • Android: Android SDK and Java Development Kit (JDK).
    • iOS: macOS with the latest version of Xcode.

App Setup & Connectivity ​

1. Initialize the Project ​

  1. Open the task_flow_flutter_app folder in your IDE.
  2. Run the following command in the terminal to fetch dependencies:
    bash
    flutter pub get

2. Connect to the Backend ​

You must point the Flutter app to your hosted Laravel API.

  1. Open lib/core/config/api_config.dart.
  2. Update the baseUrl with your domain:
    dart
    static const String baseUrl = 'https://yourdomain.com/api';

IMPORTANT

Android Emulator: Use your actual domain or https://10.0.2.2/api for local testing. Avoid localhost.


Running the App ​

platforms ​

  • Android: Connect a device or start an emulator and run flutter run.
  • iOS: Open ios/Runner.xcworkspace in Xcode, select a device, and run.
  • Web: Run flutter run -d chrome.

Deployment & Release ​

1. Building for Android (APK & AAB) ​

Generate a Keystore ​

  1. Run this command to create a secure signing key:
    bash
    keytool -genkey -v -keystore ~/upload-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload
  2. Create a key.properties file in the android/ directory:
    properties
    storePassword=your_password
    keyPassword=your_password
    keyAlias=upload
    storeFile=/path/to/upload-keystore.jks

Build Commands ​

  • Universal APK: flutter build apk --release
  • App Bundle (Play Store): flutter build appbundle --release

2. Building for iOS ​

  1. Xcode Configuration:
    • Open ios/Runner.xcworkspace.
    • Under Signing & Capabilities, select your Apple Developer Team.
    • Ensure you have a unique Bundle Identifier.
  2. Build:
    bash
    flutter build ios --release
  3. Archive: In Xcode, go to Product -> Archive to prepare the app for App Store Connect.

Changing Android Package Name ​

Changing the package name (Application ID) is critical before publishing.

Manual Steps: ​

  1. build.gradle: Update applicationId in android/app/build.gradle.
  2. AndroidManifest.xml: Update the package attribute in android/app/src/main/AndroidManifest.xml.
  3. Directory Structure: Rename the folders in android/app/src/main/kotlin/ to match your new ID (e.g., com/yourcompany/yourapp).
  4. MainActivity.kt: Update the package declaration at the top of the file.

Shortcut: ​

You can use the change_app_package_name package:

bash
flutter pub run change_app_package_name:main com.new.package.name

WARNING

Change the package name BEFORE your first Play Store upload. It cannot be changed afterward.