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

Visual Studio Code

Connect FlutterFlow to Visual Studio Code by exporting your project code (Pro plan required) via Download Code or the GitHub integration, then opening the Flutter project folder in VS Code with the official Flutter and Dart extensions installed. This lets you edit custom widgets and actions, debug on a simulator, and use hot reload — capabilities the browser editor cannot provide.

What you'll learn

  • How to export your FlutterFlow project code (ZIP or GitHub) on the Pro plan
  • How to install the Flutter and Dart extensions in VS Code
  • How to run flutter pub get and pick a device from the VS Code status bar
  • How to use VS Code's debugger and hot reload with FlutterFlow-exported code
  • How to manage the one-way sync between FlutterFlow and your local VS Code edits
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Intermediate15 min read30 minutesDevOps & ToolsLast updated July 2026RapidDev Engineering Team
TL;DR

Connect FlutterFlow to Visual Studio Code by exporting your project code (Pro plan required) via Download Code or the GitHub integration, then opening the Flutter project folder in VS Code with the official Flutter and Dart extensions installed. This lets you edit custom widgets and actions, debug on a simulator, and use hot reload — capabilities the browser editor cannot provide.

Quick facts about this guide
FactValue
ToolVisual Studio Code
CategoryDevOps & Tools
MethodCustom Action (Dart)
DifficultyIntermediate
Time required30 minutes
Last updatedJuly 2026

Why Open a FlutterFlow Project in VS Code?

FlutterFlow's browser editor is excellent for visual design and wiring up widgets, but it has a ceiling: you can't set breakpoints, inspect variable state at runtime, or run `flutter test` for unit tests without a local IDE. When you export your FlutterFlow project and open it in VS Code, you unlock the full Flutter toolchain — including hot reload on a real device, the Dart debugger, and the ability to write custom widgets and actions in a proper editor with autocomplete and error highlighting.

The bridge is FlutterFlow's built-in code export, which lives in the Pro plan ($70/month). On free or Standard plans the export button is grayed out. Once you upgrade, you can download a ZIP of your project or connect FlutterFlow to a GitHub repository and push directly. Either way you end up with a standard Flutter project folder — `pubspec.yaml`, `lib/`, `android/`, `ios/`, `web/` — that VS Code can open and understand immediately after the Flutter and Dart extensions are installed.

One golden rule shapes the whole workflow: FlutterFlow is the source of truth. Every time you click Export in FlutterFlow, the generated files in `lib/` are overwritten. Any hand-edits you made in VS Code to generated files disappear. The safe place for your VS Code work is in custom action files and custom widget files that FlutterFlow knows not to regenerate. Treat the export as a one-way feed from FlutterFlow into VS Code unless you deliberately freeze the export and take full ownership of the codebase.

Integration method

Custom Action (Dart)

FlutterFlow can export your entire project as a standard Flutter codebase — either as a ZIP download or pushed directly to a GitHub repository. Once you have that exported Flutter project on your computer, you open it in VS Code like any other Flutter project. The Dart and Flutter extensions by Dart-Code transform VS Code into a full Flutter IDE with a device selector, hot reload, and a debugger that goes far beyond what FlutterFlow's built-in Local Run can offer.

Prerequisites

  • FlutterFlow Pro plan ($70/month) — the code export feature is locked on Free and Standard
  • Visual Studio Code installed on your Mac or Windows machine (free from code.visualstudio.com)
  • Flutter SDK installed locally and added to your system PATH (download from flutter.dev)
  • A GitHub account (optional, but recommended for the GitHub push workflow instead of ZIP download)
  • At least one target device or simulator set up: iOS Simulator via Xcode, Android Emulator via Android Studio, or a physical device

Step-by-step guide

1

Upgrade to Pro and locate the export option in FlutterFlow

Code export is a Pro-plan feature in FlutterFlow. If your project is on the Free or Standard ($30/month) plan, navigate to your account settings and upgrade to Pro ($70/month). Once on Pro, open your FlutterFlow project. Look for two export paths in the top toolbar: the Download Code button (looks like a download arrow or is labeled under the top-right menu) lets you download a ZIP of the entire Flutter project right now. Alternatively, click the GitHub icon in the top-right toolbar to connect FlutterFlow to a GitHub repository — this lets you push your project to GitHub with a click, which is the better workflow for ongoing development because it keeps a clean git history. For first-time setup, choose whichever feels more comfortable; you can switch later. If you already have a GitHub integration set up from the GitHub settings (Settings → Integrations → GitHub), you'll see a Push to GitHub button that commits your current FlutterFlow state to the connected repository. Either way, trigger the export now so you have the Flutter project files ready for the next step.

Pro tip: If the Download Code or GitHub push button is grayed out, you are on the Free or Standard plan. Upgrade in Account Settings → Plan.

Expected result: You have either a ZIP file downloaded to your computer, or the Flutter project pushed to a GitHub repository you can clone.

2

Get the Flutter project onto your computer and open it in VS Code

If you downloaded a ZIP, unzip it to a folder on your computer — for example, `~/Projects/my-flutterflow-app/`. If you used GitHub, open a terminal and clone the repository: navigate to your GitHub repo, copy the HTTPS clone URL, and clone it to your Projects folder. Once the folder exists on disk, open VS Code. Go to File → Open Folder, navigate to the folder you just unzipped or cloned, and click Open. VS Code will open the project. You should immediately see the familiar Flutter project structure in the Explorer panel on the left: `pubspec.yaml` at the root, a `lib/` directory containing all the Dart files FlutterFlow generated, plus `android/`, `ios/`, and `web/` directories for platform-specific code. If VS Code shows a popup asking to install recommended extensions, that is the Flutter/Dart prompt — click Install. If that popup doesn't appear, proceed to the next step to install the extensions manually. Do not rename or move any of these folders — the Flutter build system expects this exact structure.

Pro tip: Use the GitHub clone workflow rather than repeated ZIP downloads — it means each FlutterFlow export becomes a git commit you can diff and roll back.

Expected result: VS Code shows the FlutterFlow project folder open in the Explorer panel, with pubspec.yaml and lib/ visible.

3

Install the Flutter and Dart extensions from the VS Code Marketplace

The Flutter and Dart extensions are what turn VS Code from a plain text editor into a full Flutter IDE. Both are published by Dart-Code (publisher ID: Dart-Code) and are free. To install them, click the Extensions icon in the left sidebar (it looks like four squares, or press Cmd+Shift+X on Mac / Ctrl+Shift+X on Windows). In the search box type "Flutter" — you'll see the Flutter extension by Dart-Code at the top of the results. Click Install. This extension automatically installs the Dart extension as a dependency, so you get both in one click. After installation VS Code will prompt you to reload the window — do so. Once reloaded, VS Code needs to know where your Flutter SDK is installed. If Flutter is on your PATH (you ran `flutter doctor` successfully in a terminal before), VS Code will find it automatically and you'll see the Flutter SDK path in the bottom-left status bar. If VS Code shows a banner saying "Couldn't locate the Flutter SDK" or asks you to point it to the SDK, click the banner and browse to the folder where you installed Flutter (e.g., `~/development/flutter`). Once the SDK is located, the status bar at the bottom of VS Code will show a device selector — you can click it to pick a simulator or connected device.

Pro tip: You can confirm the Flutter extension is working by opening any .dart file in lib/ — you should see syntax highlighting, autocomplete, and the Flutter icon in the activity bar.

Expected result: The Flutter and Dart extensions are installed, VS Code can find the Flutter SDK, and the device selector appears in the status bar at the bottom.

4

Run flutter pub get to install dependencies, then launch the app

FlutterFlow's exported project comes with a `pubspec.yaml` that lists all the packages your app depends on (things like `cloud_firestore`, `google_fonts`, and any custom packages you added in FlutterFlow's Custom Code dependencies). Before you can run the app, VS Code needs to download these packages. VS Code usually does this automatically when you open a Flutter project — you'll see a progress indicator in the bottom-right saying "Fetching packages" or similar. If it doesn't happen automatically, open the Command Palette (Cmd+Shift+P on Mac / Ctrl+Shift+P on Windows), type "Flutter: Get Packages", and press Enter. This is the equivalent of running `flutter pub get` and may take a minute on first run. Once packages are fetched, open the Run and Debug panel in the left sidebar (the play button with a bug icon) or press F5. VS Code will ask you to select a device if you haven't already — pick your iOS Simulator, Android Emulator, or a connected physical device from the device selector in the status bar. Press the green play button or F5 to build and launch. The app will appear on the simulator. After the first launch, you can use hot reload (press the lightning bolt button in the debug toolbar, or Cmd+S saves will trigger it automatically) to see code changes instantly without a full restart.

Pro tip: If pub get fails with version conflict errors, it usually means your local Flutter SDK is newer than the version FlutterFlow's export expects. Try running `flutter upgrade` to update, or pin the SDK version in pubspec.yaml to match FlutterFlow's target.

Expected result: The app builds successfully and launches on your simulator or device. Hot reload is available in the VS Code debug toolbar.

5

Edit custom widgets and actions in VS Code without fear of overwrites

Now that the app is running locally, you can edit Dart code in VS Code. The key distinction is WHICH files are safe to edit. FlutterFlow generates the majority of files in `lib/` — pages, widgets, routes, theme — and will overwrite them on every export. The files that belong to you and survive re-exports are the custom action files and custom widget files you create in FlutterFlow's Custom Code section. FlutterFlow places these in dedicated subfolders (typically `lib/custom_code/actions/` and `lib/custom_code/widgets/`) and explicitly avoids regenerating them. In VS Code, you can freely edit any file under `lib/custom_code/` — add logic, import pub.dev packages, add null checks, whatever you need. When you're happy with the changes, copy the updated Dart code back into the FlutterFlow editor (Custom Code panel → paste into the code editor there) so the next export from FlutterFlow will include your version. For generated files like pages and components, edit them locally only for quick debugging — never expect those edits to persist after the next FlutterFlow export. If you want to permanently keep changes to a generated file, stop exporting from FlutterFlow and manage the codebase in VS Code entirely (the "frozen fork" strategy).

calculate_discount.dart
1// Example: a custom action in lib/custom_code/actions/calculate_discount.dart
2// This file is safe to edit in VS Code — FlutterFlow won't overwrite it.
3import 'package:flutter/material.dart';
4
5// ignore_for_file: unnecessary_this
6
7Future<double> calculateDiscount(
8 double originalPrice,
9 int userTierLevel,
10) async {
11 // Tier discounts: 0=none, 1=10%, 2=20%, 3=30%
12 final discountRates = {0: 0.0, 1: 0.10, 2: 0.20, 3: 0.30};
13 final rate = discountRates[userTierLevel] ?? 0.0;
14 final discountedPrice = originalPrice * (1 - rate);
15 // Clamp to avoid negative prices
16 return discountedPrice.clamp(0.0, originalPrice);
17}

Pro tip: Never paste API keys or secrets into any Dart file to test locally — the same file compiles into the app binary that ships to users. Use App State variables combined with a Firebase Cloud Function or Supabase Edge Function proxy instead.

Expected result: Your custom action runs locally with VS Code breakpoints. You can copy the refined Dart code back into FlutterFlow's Custom Code editor to keep both environments in sync.

6

Decide your sync strategy: FlutterFlow as source of truth vs frozen fork

Before wrapping up, make a conscious decision about how you will manage the two-way tension between FlutterFlow (which owns the generated code) and VS Code (where you do local editing). There are two clean strategies. Strategy 1 — FlutterFlow as source of truth: you use FlutterFlow for all visual edits and only touch `lib/custom_code/` in VS Code. Every FlutterFlow export updates the generated files, and your custom code files are preserved because FlutterFlow skips them. This is the recommended approach for most teams. Strategy 2 — Frozen fork: you export from FlutterFlow once, immediately stop using FlutterFlow's export, and manage the entire Flutter codebase in VS Code going forward. You lose the visual builder benefits but gain full code freedom. This makes sense when FlutterFlow's generated patterns become limiting — for example, if you need to restructure state management or add a complex platform plugin that FlutterFlow can't accommodate. Whichever strategy you choose, document it in a README in the repository so collaborators know the rules. A mixed approach (editing generated files in VS Code AND continuing to export from FlutterFlow) is the one strategy that doesn't work — it leads to silent overwrites and lost work.

Pro tip: If you're unsure, start with Strategy 1. Most FlutterFlow projects only need VS Code for custom actions and debugging, not for wholesale code ownership.

Expected result: You have a documented sync strategy. Your team knows which files are owned by FlutterFlow and which are safe to edit in VS Code permanently.

Common use cases

Debugging a complex custom action with breakpoints

You built a custom Dart action in FlutterFlow to calculate subscription pricing, but it returns the wrong result and FlutterFlow's console gives no clues. Export to VS Code, set a breakpoint inside the action, and run the app on the iOS Simulator to see exactly which variable is wrong.

FlutterFlow Prompt

I need to debug a Dart custom action that handles subscription tier logic. Export the FlutterFlow project, open in VS Code, set a breakpoint in the action, and run on simulator.

Copy this prompt to try it in FlutterFlow

Writing a custom widget that needs a pub.dev package

You want to embed an interactive chart library from pub.dev that FlutterFlow doesn't support natively. Export the project, add the package to `pubspec.yaml` in VS Code, write the custom widget Dart code, then import it back as a FlutterFlow custom widget so it appears in the widget tree.

FlutterFlow Prompt

Add the fl_chart pub.dev package to the exported Flutter project in VS Code, build a bar chart widget, and prepare it to be imported back into FlutterFlow as a custom widget.

Copy this prompt to try it in FlutterFlow

Running automated tests against the exported Flutter app

Before shipping a major feature, you want to run widget tests and integration tests that aren't possible inside FlutterFlow's editor. Export the project to VS Code, write test files under the `test/` directory, and run the test suite from VS Code's Test panel.

FlutterFlow Prompt

Export the FlutterFlow project and write Flutter widget tests in VS Code to cover the login flow and the dashboard data display before the next release.

Copy this prompt to try it in FlutterFlow

Troubleshooting

VS Code shows a red banner: "Couldn't find the Flutter SDK. Please locate the Flutter SDK manually."

Cause: VS Code's Flutter extension cannot find the Flutter SDK because it isn't on your system PATH, or you installed it in a non-standard location.

Solution: Click the banner and browse to the folder where you installed Flutter — typically something like `~/development/flutter` on Mac or `C:\src\flutter` on Windows. Alternatively, open VS Code Settings → search for "Flutter SDK Path" and paste the path. After setting the path, restart VS Code. Confirm the SDK is found by opening the Command Palette → type "Flutter: Run Flutter Doctor" and check that all required items show green.

pub get fails with: "Because my_app depends on package_x ^2.0.0 which requires SDK >=3.2.0, version solving failed."

Cause: Your local Flutter SDK version is older than the minimum SDK constraint in one of FlutterFlow's pinned packages, or your SDK is newer and a transitively required package has been deprecated.

Solution: Open a terminal, run `flutter upgrade` to update Flutter to the latest stable release, then retry. If it still fails, open `pubspec.yaml` and check the `environment: sdk:` field — lower the minimum version constraint to match your installed Flutter SDK version. For dependency conflicts between specific packages, check pub.dev for compatible version ranges and pin the conflicting package to a working version.

Hand-edited code in a generated page file (e.g., lib/pages/home/home_widget.dart) disappeared after re-exporting from FlutterFlow.

Cause: FlutterFlow's export regenerates all files in lib/ that it authored, overwriting any local changes. Only files under lib/custom_code/ are preserved across exports.

Solution: Move your logic into a custom action or custom widget file under `lib/custom_code/`. Never edit generated widget or page files expecting the changes to survive the next export. If you need a permanent change in a generated file, copy the Dart logic into a custom action called from that page, then paste the custom action code into FlutterFlow's Custom Code editor so it's managed there.

Hot reload does not work; VS Code shows: "Hot reload was rejected: changes require a hot restart" or the app just doesn't update.

Cause: Some changes — like adding new imports, changing const constructors, or modifying initState — require a hot restart rather than a hot reload. Hot reload only works for changes to build() methods and stateful widget logic.

Solution: Click the circular restart arrow in the VS Code debug toolbar (not the stop/play buttons) to perform a hot restart. This takes a few more seconds than hot reload but applies all code changes. For frequent structural changes during development, use hot restart. Reserve hot reload for quick UI tweaks.

Best practices

  • Keep FlutterFlow as the source of truth for all visual design — only touch lib/custom_code/ in VS Code to avoid overwrite surprises on the next export.
  • Never paste API keys, service account credentials, or any secret values into Dart files — they ship inside the compiled app binary accessible to anyone who decompiles it. Route secrets through a Firebase Cloud Function or Supabase Edge Function.
  • Run flutter doctor in a terminal after installing the Flutter SDK to confirm all required tools (Xcode, Android toolchain, VS Code plugin) are correctly configured before your first local run.
  • Use VS Code's built-in Git panel to commit after each significant local edit so you can diff against the last FlutterFlow export and spot unintentional overwrites.
  • Install only the Dart-Code Flutter and Dart extensions — do not install other Dart or Flutter extensions from different publishers, as they can conflict and cause confusing errors.
  • Test custom actions on a real device or simulator from VS Code, not just in FlutterFlow's Local Run mode — custom code does not run in FlutterFlow's web-based Run mode preview.
  • Document your sync strategy (FlutterFlow-as-source-of-truth vs frozen fork) in a README or AGENTS.md file in the repository so every collaborator follows the same rules.
  • Before each FlutterFlow export, commit any local VS Code changes to a git branch so you can restore them if the export unexpectedly regenerates a file you were editing.

Alternatives

Frequently asked questions

Do I need the FlutterFlow Pro plan to use VS Code with my project?

Yes. Code export — whether as a ZIP download or a GitHub push — is a Pro-plan feature ($70/month). On the Free or Standard ($30/month) plan, the export buttons are locked and there is no way to get your FlutterFlow project into VS Code. If you only need to view the generated code and not edit it locally, Pro is still required.

Will my VS Code edits be lost when I export from FlutterFlow again?

Only if you edited generated files. FlutterFlow regenerates everything in lib/ except files under lib/custom_code/. Custom actions and custom widgets you create in FlutterFlow's Custom Code panel are placed there and preserved across exports. Keep all permanent local edits inside lib/custom_code/ and you won't lose them.

Can I use VS Code to add pub.dev packages that FlutterFlow doesn't support natively?

Yes. Add the package to pubspec.yaml in VS Code, run flutter pub get, and write the integration Dart code inside a custom action or custom widget file. When you're satisfied, paste the Dart code back into FlutterFlow's Custom Code editor and add the same package to FlutterFlow's Dependencies field so the FlutterFlow export and your local VS Code environment stay in sync.

Is there an easier path if I don't want to manage the FlutterFlow/VS Code sync myself?

RapidDev's team builds and maintains FlutterFlow integrations — including complex custom code setups and VS Code development workflows — every week. If the sync strategy feels overwhelming, a free scoping call at rapidevelopers.com/contact can help you decide whether a managed approach makes sense for your project timeline.

Does hot reload work the same in VS Code as in FlutterFlow's Local Run?

Hot reload works in VS Code for changes to widget build methods and stateless UI logic — you save a file and the simulator updates in under a second. However, structural changes like adding new imports, modifying initState, or changing widget type hierarchies require a hot restart (the circular arrow button in the debug toolbar). FlutterFlow's Local Run has similar limitations but surfaces them differently.

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.