Skip to content

Deployment: Mobile Client

This guide outlines the process for deploying the Flutter News App Mobile Client to the Google Play Store and Apple App Store.

Before you can build the app for production, you must configure it to connect to your live API server.

  1. Set the Production Environment

    • Open the file lib/main.dart.
    • Locate the appEnvironment constant.
    • Set its value to AppEnvironment.production.
    lib/main.dart
    // Use `AppEnvironment.production` to connect to a live backend API.
    const appEnvironment = AppEnvironment.production;
  2. Verify the API Base URL

    • Open the file lib/app/config/app_config.dart.
    • Ensure that the baseUrl for the production case points to the correct URL of your deployed API Server.
  3. Configure App Icons

    The project uses flutter_launcher_icons to generate app icons. You will need to update the configuration in pubspec.yaml to use your own icon assets.

    • Open pubspec.yaml.
    • Locate the flutter_launcher_icons section.
    • Update the image_path to point to your desired icon image.
    • After updating, run the following command to generate the new icons:
      Terminal window
      flutter pub run flutter_launcher_icons:main
  4. Configure Native Splash Screen

    The project uses flutter_native_splash for native splash screens. You will need to update the configuration in pubspec.yaml to use your own splash screen assets and colors.

    • Open pubspec.yaml.
    • Locate the flutter_native_splash section.
    • Update color, color_dark, image, and image_dark to match your branding.
    • After updating, run the following command to generate the new splash screens:
      Terminal window
      flutter pub run flutter_native_splash:create

Once your configuration is ready, you can proceed with building and releasing the application. The official Flutter documentation provides comprehensive, platform-specific guides that cover every required step, from generating app icons to configuring code signing and uploading to the stores.

Following these official guides is the recommended and most reliable path to a successful release.