Development Environment Setup
This document describes how to set up a Flutter development environment for this project.
We recommend installing Flutter via the SDK ZIP archive, not through Visual Studio Code or other package managers, to ensure a consistent setup across all team members.
INFO
This guide is only a summary of the official Flutter installation instructions. Please refer to the official Flutter installation guide for more detailed information and troubleshooting.
Prerequisites
Windows
- Download and install the latest version of Git for Windows.
- Set up an editor or IDE that supports Flutter. We recommend Android Studio.
macOS
Install the Xcode command-line tools including git:
bashxcode-select --install
Set up an editor or IDE that supports Flutter.
Linux
Download and install prerequisite packages: curl
, git
, unzip
, xz-utils
, zip
, libglu1-mesa
For Debian/Ubuntu run:
sudo apt-get update
sudo apt-get install -y curl git unzip xz-utils zip libglu1-mesa
Chrome OS
- Enable Linux (Beta) on your Chromebook.
- Follow the Linux instructions above.
Install Flutter SDK
Download the latest stable Flutter SDK ZIP:
Extract the ZIP to a desired location:
<your-path>/flutter
WARNING
The path may not contain any spaces and must not require elevated privileges.
Add Flutter to your PATH:
- Windows (PowerShell):powershell
setx PATH "$($env:PATH);<your-path>\flutter\bin"
- macOS/Linux (bash/zsh):bash
export PATH="$PATH:<your-path>/flutter/bin"
- Windows (PowerShell):
Verify installation:
bashflutter doctor
INFO
Some issues may be reported, which is normal at this stage. We will address them in the following steps.
Set Up Android Development
Download and install Android Studio.
During setup, make sure to install:
- Newest Android SDK
- Android SDK Build-Tools
- NDK
WARNING
The NDK version must match the one specified in
android/app/build.gradle
because of native dependencies. - Android Emulator (if you plan to use it)
- Android SDK Platform-Tools
- Google USB Driver (for Windows users to connect physical devices)
Open Android Studio and install the Flutter and Dart plugins.
Accept android licenses:
bashflutter doctor --android-licenses
Verify Setup
Run the following command to check if everything is set up correctly:
flutter doctor
Fix any issues listed in the output before proceeding.
INFO
Some issues may remain, such as missing Visual Studio or iOS tools. These can be ignored if you don't plan to develop for those platforms.
Setup Project
Clone the project repository using git and install dependencies:
git clone https://github.com/RubberDuckCrew/gitdone.git
cd gitdone
flutter pub get
Run the App
Connect a physical device or start an emulator.
Run the app:
bashflutter run
INFO
The first run may take a while as Flutter needs to download many gradle dependencies.
To run on a specific platform, use:
bashflutter run -d <device-id>
You can list all connected devices with
flutter devices
.To build a release version, use:
bashflutter build <platform> -PskipSigning=true
Replace
<platform>
withapk
,appbundle
,ios
,web
, etc. See Flutter's build documentation for more details.INFO
The
-PskipSigning=true
flag is used to skip the signing process for the release build because we only use signing in the CI/CD build pipelines.
Additional steps
Formatter and Analyzer
We use the dart formatter and analyzer to ensure code quality. You can run them with:
dart format .
dart analyze
To automatically format code on save, configure your IDE accordingly. See Flutter's guide for more information.