Skip to main content
RapidDev - Software Development Agency
flutterflow-integrationsCustom Action (Dart)

GitLab

Connect FlutterFlow to GitLab by first enabling FlutterFlow's built-in GitHub integration (Pro plan required), pushing your project to a GitHub repository, then setting up a GitLab pull mirror that imports every FlutterFlow commit automatically. From there, a .gitlab-ci.yml pipeline with a Flutter Docker image handles testing and building your app.

What you'll learn

  • Why FlutterFlow has no native GitLab connector and how the GitHub-mirror workaround fills the gap
  • How to connect FlutterFlow to a GitHub repository using Settings → Integrations → GitHub
  • How to create a GitLab pull mirror pointing at the GitHub repository
  • How to authenticate private-repo mirroring with a GitHub Personal Access Token
  • How to write a .gitlab-ci.yml pipeline that installs Flutter and runs tests on every mirrored commit
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Intermediate14 min read45 minutesDevOps & ToolsLast updated July 2026RapidDev Engineering Team
TL;DR

Connect FlutterFlow to GitLab by first enabling FlutterFlow's built-in GitHub integration (Pro plan required), pushing your project to a GitHub repository, then setting up a GitLab pull mirror that imports every FlutterFlow commit automatically. From there, a .gitlab-ci.yml pipeline with a Flutter Docker image handles testing and building your app.

Quick facts about this guide
FactValue
ToolGitLab
CategoryDevOps & Tools
MethodCustom Action (Dart)
DifficultyIntermediate
Time required45 minutes
Last updatedJuly 2026

Why There Is No Native FlutterFlow → GitLab Connection

FlutterFlow's philosophy is to handle source control through its built-in GitHub integration: when you push your project from FlutterFlow it commits the generated Flutter code to a GitHub repository with a single click. GitLab is not a supported target, and there is no 'Connect GitLab' button anywhere in FlutterFlow's settings. The only honest path to GitLab is through GitHub as an intermediary.

The good news is that GitLab has a first-class repository mirroring feature that makes this straightforward. You point a GitLab project at the GitHub repository FlutterFlow writes to, and GitLab checks for new commits periodically (or immediately when triggered) and imports them. From GitLab's perspective the Flutter project looks like any Flutter repo it hosts natively, so your full CI/CD tooling — .gitlab-ci.yml pipelines, container registry, merge request approvals, environments — works without any special configuration.

The setup involves three tools: FlutterFlow (Pro plan for export), GitHub (hosts the generated Flutter project), and GitLab (mirrors it and runs CI). The flow is always one-directional: FlutterFlow → GitHub → GitLab. Edits made directly in GitLab or in a local branch pushed to GitLab will not flow back to FlutterFlow and will be overwritten the next time FlutterFlow exports. Keep FlutterFlow as the source of truth for all visual changes, and use GitLab purely for CI/CD, security scanning, and deployment pipelines.

Integration method

Custom Action (Dart)

FlutterFlow has no native GitLab connector — its only built-in Git target is GitHub. The bridge is a GitLab repository mirror: FlutterFlow pushes the generated Flutter project to GitHub via its Settings → Integrations → GitHub panel, then GitLab pulls from that GitHub repo through its Mirroring repositories feature. Every FlutterFlow export appears in GitLab automatically, where a .gitlab-ci.yml pipeline can pick it up, run flutter test, and build Android APK or web artifacts using a Flutter-ready Docker image.

Prerequisites

  • FlutterFlow Pro plan ($70/month) — the GitHub export integration requires Pro; Free and Standard plans cannot push code
  • A GitHub account and an empty GitHub repository to receive FlutterFlow's exports
  • A GitLab account (GitLab Free tier is sufficient for mirroring and basic CI)
  • A GitHub Personal Access Token (PAT) with repo scope — needed for GitLab to mirror a private GitHub repository
  • Basic familiarity with YAML files for writing the .gitlab-ci.yml pipeline configuration

Step-by-step guide

1

Connect FlutterFlow to GitHub and push the initial Flutter project

FlutterFlow's GitHub integration is the only supported way to get your project code out of the browser editor and into a Git host. Open your FlutterFlow project and navigate to Settings (gear icon) → Integrations → GitHub. Click Connect GitHub, which opens an OAuth authorization flow — approve access for your GitHub account or organization. After authorization, FlutterFlow asks you to choose a repository: you can let FlutterFlow create a new repo, or select an existing empty one. For a GitLab mirror setup, create a dedicated GitHub repo like `my-app-flutterflow` so it has a clear purpose. Once connected, click Push to GitHub (the GitHub icon in the top toolbar will now be active). FlutterFlow generates the entire Flutter project — all Dart files, pubspec.yaml, platform folders — and commits it to the `main` branch of your GitHub repository. This initial commit is the foundation the GitLab mirror will pull from. Verify the push worked by opening your GitHub repository in a browser: you should see a standard Flutter project structure with lib/, android/, ios/, web/, and pubspec.yaml at the root. Going forward, every time you make changes in FlutterFlow and click the Push to GitHub button, a new commit appears in this repository.

Pro tip: If the GitHub integration button stays grayed out after upgrading to Pro, sign out and back into FlutterFlow, then return to Settings → Integrations → GitHub.

Expected result: Your FlutterFlow project's Flutter code is visible in a GitHub repository, with a standard Flutter project structure committed to the main branch.

2

Create a GitLab project and configure a pull mirror from GitHub

Log into GitLab (gitlab.com or your self-hosted instance) and create a new blank project with any name — for example, `my-app-gitlab`. Do not initialize it with a README since the mirror will provide all content. Once the blank project is created, open the project's left sidebar and navigate to Settings → Repository. Scroll down to the Mirroring repositories section and click Expand. Click the Add new mirror button (the label may say 'Add a mirror' depending on your GitLab version). In the Git repository URL field, paste the HTTPS clone URL of your GitHub repository — it looks like `https://github.com/your-username/my-app-flutterflow.git`. Set the Mirror direction to Pull (GitLab pulls FROM GitHub). If your GitHub repository is private — which it should be, since FlutterFlow commits your entire app code — you need to authenticate: in the Authentication section, select Personal access token and paste a GitHub Personal Access Token (PAT) with at least repo read scope. You can generate a PAT in GitHub → Settings → Developer Settings → Personal access tokens → Fine-grained tokens. Check the box for Mirror only protected branches if you want to limit what syncs. Click the Save button. GitLab will immediately attempt an initial mirror sync — you can click the refresh icon next to the mirror entry to trigger it manually. After a minute, refresh your GitLab project's repository view: you should see the same Flutter project files that are in GitHub.

Pro tip: GitLab free-tier mirroring updates approximately every 5 minutes. GitLab Premium reduces the polling interval. For immediate triggers, use a GitHub webhook that calls GitLab's mirror trigger API endpoint.

Expected result: The GitLab project's repository tab shows the same Flutter project files that FlutterFlow pushed to GitHub — the mirror is active and synced.

3

Add a GitHub Personal Access Token for private-repo mirroring

If your GitHub repository is public you can skip this step, but a private repository is strongly recommended since your Flutter source code may contain logic you don't want exposed. The GitLab mirror needs read access to your GitHub repo. In GitHub, go to your account avatar in the top-right → Settings → Developer settings → Personal access tokens → Fine-grained tokens → Generate new token. Give it a descriptive name like "GitLab mirror for FlutterFlow app." Set the Expiration to a reasonable period (90 days or 1 year, then set a calendar reminder to rotate it). Under Repository access, select Only select repositories and choose the specific FlutterFlow GitHub repo. Under Permissions, grant Contents: Read-only — this is the minimum required for mirroring. Click Generate token and copy it immediately (it won't be shown again). Go back to your GitLab project → Settings → Repository → Mirroring repositories, click Edit on the mirror you created, and paste the token in the Password or Token field. Save. Test by clicking the sync icon — if the mirror shows a green checkmark, authentication is working. If it shows a red error, double-check that the PAT has access to the correct repository and that you copied it without extra spaces.

Pro tip: Store the GitHub PAT also as a GitLab CI/CD variable (Settings → CI/CD → Variables) if any of your pipeline jobs need to push back to GitHub — though for a one-way mirror setup you typically don't.

Expected result: The GitLab mirror entry shows a green status badge, confirming it can authenticate with GitHub and pull commits successfully.

4

Write a .gitlab-ci.yml pipeline that runs flutter test and builds the app

Now that GitLab has your Flutter project via the mirror, you can run CI/CD pipelines on it. Create a file called `.gitlab-ci.yml` at the root of your GitLab repository. The key challenge for Flutter CI on GitLab is that the default runner images don't include the Flutter SDK — you need to specify a Docker image that has Flutter pre-installed. The most commonly used image is `ghcr.io/cirruslabs/flutter:stable` (published by Cirrus CI and widely used in the community). Your pipeline needs at least two jobs: a test job that runs `flutter test` to validate the app, and optionally a build job that compiles `flutter build web --release` or `flutter build apk --release`. Keep secrets (signing keystores, API keys) in GitLab CI/CD variables (Settings → CI/CD → Variables) — never commit them to the repository. Reference them in the pipeline as `$VARIABLE_NAME`. The pipeline triggers automatically on every commit that the mirror syncs from GitHub, which means every FlutterFlow export that triggers a Push to GitHub will also trigger your GitLab CI pipeline within minutes.

.gitlab-ci.yml
1# .gitlab-ci.yml Flutter CI pipeline for a FlutterFlow-exported project
2
3image: ghcr.io/cirruslabs/flutter:stable
4
5stages:
6 - test
7 - build
8
9# Cache pub packages between pipeline runs to speed up jobs
10cache:
11 key: "flutter-pub-cache"
12 paths:
13 - .pub-cache/
14
15variables:
16 PUB_CACHE: "$CI_PROJECT_DIR/.pub-cache"
17
18before_script:
19 - flutter --version
20 - flutter pub get
21
22flutter_test:
23 stage: test
24 script:
25 - flutter analyze
26 - flutter test --coverage
27 artifacts:
28 when: always
29 reports:
30 coverage_report:
31 coverage_format: cobertura
32 path: coverage/cobertura.xml
33
34build_web:
35 stage: build
36 script:
37 - flutter build web --release
38 artifacts:
39 paths:
40 - build/web/
41 expire_in: 1 week
42 only:
43 - main

Pro tip: Add this .gitlab-ci.yml file directly in the GitLab project UI (Repository → + → New file) rather than committing it to the GitHub repo, so FlutterFlow exports don't overwrite it.

Expected result: A GitLab pipeline appears under CI/CD → Pipelines, showing the flutter_test and build_web jobs running automatically against the mirrored FlutterFlow code.

5

Verify the end-to-end flow and set GitLab pipeline notifications

Test the complete pipeline by making a visible change in FlutterFlow — for example, changing a text label on one of your screens — then clicking the Push to GitHub button in FlutterFlow. Wait up to 5 minutes for GitLab's mirror polling interval to pick up the new commit (or click the sync icon in GitLab → Settings → Repository → Mirroring repositories to trigger an immediate sync). Once the commit appears in your GitLab project's repository, navigate to CI/CD → Pipelines — you should see a new pipeline triggered by the mirrored commit. Click into the pipeline to watch the individual jobs run: the test job will run `flutter analyze` and `flutter test`, and the build job will compile the web artifact. If everything is green, the integration is fully working. To stay informed about pipeline results, set up GitLab email notifications: go to your GitLab account → Notifications and set the notification level for this project to only failed pipelines (so you get alerted when a FlutterFlow export breaks a test, without getting spammed on every successful run). You can also connect GitLab to Slack via Settings → Integrations → Slack Notifications for team-wide alerts.

Pro tip: If the mirror isn't picking up new commits automatically, check that the GitHub PAT hasn't expired. Set a calendar reminder to rotate the PAT before its expiry date to avoid CI silently stopping.

Expected result: A FlutterFlow export triggers a commit in GitHub, which mirrors to GitLab within minutes and automatically starts the CI pipeline — the full one-way pipeline is working end-to-end.

Common use cases

Running automated flutter test on every FlutterFlow export

Every time a designer exports a new version of the FlutterFlow project, the commit is mirrored to GitLab, triggering a pipeline that runs flutter test and blocks a deployment if widget tests fail. This gives an engineering team a quality gate they can't get inside FlutterFlow alone.

FlutterFlow Prompt

Set up GitLab CI to run flutter test on every FlutterFlow commit that arrives via the GitHub mirror, and block deployment if any tests fail.

Copy this prompt to try it in FlutterFlow

Building and distributing Android APKs through GitLab CI/CD

Your company's IT team has GitLab runners and uses GitLab's package registry. Each FlutterFlow export triggers a pipeline that compiles an Android APK, signs it with a keystore stored in GitLab CI variables, and uploads it to the GitLab package registry for internal distribution.

FlutterFlow Prompt

Write a .gitlab-ci.yml that builds a signed release Android APK from the FlutterFlow export, using the keystore from CI variables, and uploads the artifact to GitLab.

Copy this prompt to try it in FlutterFlow

Running security scanning on the generated Flutter codebase

Your enterprise requires static analysis on all code before it reaches production. GitLab's SAST and dependency scanning jobs run automatically on each mirrored FlutterFlow commit, flagging vulnerable packages or hardcoded credentials in the generated Dart.

FlutterFlow Prompt

Enable GitLab SAST and dependency scanning on the mirrored FlutterFlow Flutter project to catch security issues in the generated code before deployment.

Copy this prompt to try it in FlutterFlow

Troubleshooting

GitLab mirror shows a red error badge with "Authentication failed" after setup.

Cause: The GitHub Personal Access Token entered in the GitLab mirror configuration is incorrect, expired, or does not have read access to the repository.

Solution: Go to GitHub → Settings → Developer settings → Personal access tokens and generate a new token with repo read scope for the specific FlutterFlow repository. In GitLab → Settings → Repository → Mirroring repositories, click Edit on the mirror entry and paste the new token in the Password field. Save and click the sync icon to retry. Confirm the token is for the correct GitHub account that owns the repository.

Expected a 'Connect GitLab' button in FlutterFlow's Settings → Integrations, but it doesn't exist.

Cause: FlutterFlow has no native GitLab integration. Its only Git target is GitHub. The button simply does not exist.

Solution: This is expected behavior — the GitHub-to-GitLab mirror workaround described in this guide is the only supported path. First connect FlutterFlow to GitHub (Settings → Integrations → GitHub), push the project there, then set up the GitLab mirror as described in step 2. There is no shortcut.

GitLab CI pipeline fails with: "Could not find a file named 'pubspec.yaml' in the current directory" or "flutter: command not found".

Cause: Either the pipeline is running in the wrong working directory, or the Docker image specified in .gitlab-ci.yml doesn't have Flutter installed.

Solution: Confirm the image line in .gitlab-ci.yml is `image: ghcr.io/cirruslabs/flutter:stable` — that image includes the Flutter SDK. Also verify that `flutter pub get` is in your `before_script` and is running before any flutter commands. If you get the pubspec.yaml error, your repository might have a non-standard structure from the FlutterFlow export — check that pubspec.yaml is at the root of the repo and not inside a subdirectory.

A CI/CD pipeline commit pushed from GitLab was overwritten by the next FlutterFlow mirror sync.

Cause: The GitHub-to-GitLab mirror is a read-only pull mirror — commits made directly in GitLab are not pushed back to GitHub. When FlutterFlow exports again and mirrors to GitLab, it force-updates the mirror, overwriting GitLab-only commits.

Solution: Never commit application code changes directly in GitLab for files that FlutterFlow generates. The only file safe to commit directly in GitLab is .gitlab-ci.yml, because FlutterFlow exports don't include it. For all other code changes, make them in FlutterFlow, push to GitHub, and let the mirror carry them to GitLab.

Best practices

  • Keep the GitHub repository that FlutterFlow writes to private — it contains your full app source code including any custom action logic.
  • Never commit google-services.json, keystores, or API keys into the GitHub or GitLab repository — store them as GitLab CI/CD variables and reference them in the pipeline as $VARIABLE_NAME.
  • Add .gitlab-ci.yml directly in GitLab (not in the GitHub repo) so FlutterFlow exports can never overwrite your pipeline configuration.
  • Rotate the GitHub Personal Access Token used for mirroring before it expires — set a calendar reminder at creation time to avoid silent CI failures.
  • Use GitLab's protected branches feature to prevent the mirror from overwriting a production branch accidentally — mirror only to main and deploy from there through a merge request flow.
  • Cache the .pub-cache directory in your pipeline to speed up subsequent runs; the first run fetches all Flutter packages, but cached runs are significantly faster.
  • Use GitLab CI/CD environments (Settings → CI/CD → Environments) to track which FlutterFlow export version is deployed to staging vs production.
  • Add flutter analyze to your pipeline before flutter test — it catches type errors and deprecation warnings in the generated Dart code that tests alone won't catch.

Alternatives

Frequently asked questions

Does FlutterFlow have a native GitLab integration?

No. FlutterFlow's only built-in Git integration targets GitHub. GitLab is reached through a repository mirror: FlutterFlow pushes to GitHub, and GitLab pulls from GitHub automatically. There is no 'Connect GitLab' button in FlutterFlow's settings, and one is not announced for the near future.

How often does the GitLab mirror sync commits from GitHub?

GitLab's pull mirror polls for new commits approximately every 5 minutes on the free tier. You can trigger an immediate sync by clicking the sync icon in Settings → Repository → Mirroring repositories. GitLab Premium reduces the polling interval further. For near-instant sync, configure a GitHub webhook that calls GitLab's mirror trigger API after each push.

Can I push code changes from GitLab back to FlutterFlow?

Not directly. The mirror is one-way: FlutterFlow → GitHub → GitLab. Changes committed in GitLab will be overwritten by the next FlutterFlow export via mirror. The only sustainable workflow is FlutterFlow as the source of truth for generated code, and GitLab as the CI/CD runtime. Custom action Dart files should be edited in FlutterFlow's Custom Code editor, not in the GitLab repository.

What Flutter Docker image should I use for GitLab CI?

The most widely used image for Flutter on GitLab CI is `ghcr.io/cirruslabs/flutter:stable`, published by Cirrus CI. It includes the full Flutter SDK, Dart, and the necessary build tools. Specify it at the top of your .gitlab-ci.yml with `image: ghcr.io/cirruslabs/flutter:stable`. You can pin a specific Flutter version by replacing `stable` with a version tag like `3.22.0`.

Can I build iOS IPA files from the GitLab pipeline?

Building iOS apps requires a macOS runner with Xcode installed, which GitLab's free shared runners don't provide (they run Linux). You would need to register a self-hosted GitLab runner on a Mac, or use a third-party CI service like Codemagic or Bitrise that specializes in mobile CI. For Flutter web and Android APK builds, the Linux runners with the Flutter Docker image work fine.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Integrations are where projects stall

We wire FlutterFlow integrations like this one every week — auth, webhooks, edge cases included. Fixed-price builds from $13K, delivered in 6–10 weeks.

Talk to an integration engineer

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.