Skip to content

Project Setup

Michael edited this page Apr 4, 2021 · 4 revisions
  1. Make sure to have Android Studio installed and the Flutter SDK. This is the official documentation for installing Flutter on your platform.
  2. Run flutter channel and make sure you are on flutter's stable channel. If you were not on the stable channel flutter
    • Run flutter channel stable
    • Run flutter upgrade
  3. Run flutter clean for most of first run errors you may face.
  4. Run flutter packages get to download pubspec dependencies.
  5. To generate the launcher icon, run flutter pub run flutter_launcher_icons:main.
  6. Run flutter run to try it live on running emulator or usb connected device. You can target a specific device to run by run flutter devices and getting the id and running flutter run -d <device_id>.
  7. Run flutter build apk to generate APK file or run flutter build ios to package iOS app.
  8. Since we use flavors to manage different modes of the app:
  • For Production Build: flutter build apk --split-per-abi or flutter build apk --split-per-abi dart-define=ENV=prod
  • For Testing Build: flutter build apk --split-per-abi --dart-define=ENV=test

Qualtrics API key

In assets/ directory, make sure you add a secrets.json file and copy in the appropriate datacenter and apiKey json contents. secrets.json is referenced in the .gitignore and should not be committed to source control. If the API key is compromised, a new API key can be generated via the Qualtrics Dashboard.

In case you want to test the app without having our API key

  1. Go to Qualtrics website.
  2. Make a test survey.
  3. Generate an API Key.
  4. Add it to assets/secrets.json as
{
  "api_key": "YOUR_KEY",
  "data_center": "YOUR_DATA_CENTER"
}
Clone this wiki locally