Links

Testing On Mobile Device

This page guides you on testing your app on a mobile device.

Prerequisites

Before you start testing on a mobile device, make sure to set up your machine.

How To Test On Mobile Device

Testing your app on a mobile device consists of the following steps:

1. Download Code

FlutterFlow allows you to download the entire codebase and run it on your preferred IDE. This feature is included in our Standard and Pro plans.
Make sure to address any project issues, before downloading the code.
To download your app code:
  • Move to the toolbar and click on the Developer Menu (
    ) > Download Code (
    ). This will download the .zip file. Extract the .zip file to view the contents of the project.
  • Alternatively, you can also download and extract the code using FlutterFlow CLI.
    1. 1.
      To do so, open the terminal and hit the dart pub global activate flutterflow_cli.
    2. 2.
      Once installed, enter this command: flutterflow export-code --project <project id> --dest <output folder> --[no-]include-assets --token <token> Note that you must replace the <project id>, <output folder>, and <token> with your own.
You can find the project id in the app URL and the API token on your account page.
Download from builder
Download via CLI
Download from builder
Download via CLI
Project id

2. Opening The Project In An Editor (Android Studio)

To open the downloaded project in Android Studio:
  • Open Android Studio.
  • Click on Open and select the project folder from where you have downloaded the code earlier.
  • To generate the code required for the project to compile, navigate to Terminal in Android Studio and enter the commands below:
flutter pub get
flutter pub run flutter_launcher_icons:main
  • The second command is only necessary if using Firestore. The third is only necessary if you have an App Launcher Icon.
  • Entering the above command for the first time may take some time to run.

3. Running The App On A Device

You can choose to run your app on a real device or an emulator.
To run your app on a device:
  • Open the Android Studio.
  • Select the Flutter Device Selection dropdown (in the Toolbar) and choose the device.
  • Click on the Run button (looks like a green color play button).
If your device is not listed in the Flutter Device Selection dropdown, make sure you have properly completed the Android and iOS setup. You can find the instructions for setting up an Android device here and here and for iOS check this and this.