Skip to content
Tech Stack18 September 2026 · 7 min readUpdated 30 September 2026

When Pub Packages Break Inside FlutterFlow's Build

Some Flutter packages compile locally and die inside FlutterFlow's cloud build. Here is how I check a dependency on its pub.dev page before designing a widget around it.

When Pub Packages Break Inside FlutterFlow's Build

What you'll learn

  • Why is your FlutterFlow custom code package not working?
  • How do pubspec dependencies work in FlutterFlow?
  • Which packages are safe inside a FlutterFlow custom widget?
Article contents

A package that compiles on your laptop isn't automatically a package FlutterFlow will build. If a dependency is failing right now, open its pub.dev page and look at the platform row before you touch your widget code, because the missing piece is usually there and not in your Dart.

Across eight marketplace templates and more than forty custom widgets, the question I ask before designing a widget is whether the dependency it needs will survive FlutterFlow's cloud build, not whether the widget can be written. The case study records the constraint plainly: pub package limits are real, and some packages that work in plain Flutter break inside FlutterFlow's build. If the vocabulary is new, what Flutter actually is is the shorter prerequisite.

Why is your FlutterFlow custom code package not working?

Risograph-style print of a padded parcel jammed halfway through a narrow brass letter slot, its crushed corner torn open with tape peeling away, ink layers slightly misregistered

Usually because the package needs something the cloud build can't provide: web support for Run/Test Mode, native platform code you can't edit, or a version that conflicts with what FlutterFlow already depends on.

Notice what's absent from that list. Your widget code. What fails is dependency resolution, and the error names packages you didn't add in versions you didn't choose.

FlutterFlow's custom code documentation puts platform support first when choosing a package from pub.dev: "WEB: It must support Web to run your app in our Run/Test Mode." That is a prerequisite for the editor's own preview, so a package can be well maintained, popular on mobile and still unusable here. The same page warns: "The current dependency might depend on other dependencies to work. So make sure you also copy the name and version of all the additional dependencies." Transitive dependencies are where the surprises live.

How do pubspec dependencies work in FlutterFlow?

Two stacks of printed sheets pressed together into one block on a workbench, several sheets from the left stack protruding at the wrong length where the two meet, a dried coffee ring staining the bench beside them

You hand FlutterFlow a package name and a version in one of two places, and the build has to resolve them against everything else the project depends on.

According to the same documentation, there are two routes. Globally, go to Settings and Integrations, then Project Dependencies, then the Custom Dependencies tab, and click Add Pub Dependency with the name and version. Locally, paste the Pubspec Dependency into the bottom-right panel of a custom code file and add the import after the default imports.

Pub's version solver still has to find one version of every package that satisfies all constraints at once. I can't inspect FlutterFlow's generated pubspec from here, so treat that as how pub works generally, not a description of FlutterFlow's internals. What FlutterFlow does document is the shared-dependency rule for imported libraries: "if the project and the library share the same dependency, the version must match exactly to avoid conflicts" (Libraries documentation). Exactly, not compatibly, which is narrower than the caret ranges you'd write by hand.

Why do pure-Dart packages fit and native plugins don't?

A printing press bed holding a heavy bolted iron bracket that has torn a ragged hole through the paper beneath it, next to a flat paper cut-out lying perfectly flush and undamaged

A pure-Dart package is source that compiles with your widget, while a plugin carries platform-specific code, and FlutterFlow doesn't let you edit that native side in its web UI.

Flutter's own package documentation defines plugin packages as "an API written in Dart code combined with one or more platform-specific implementations", which can be written in Kotlin, Java, Swift or Objective-C. FlutterFlow's MethodChannels guide states that the platform "does not allow direct editing of platform-native code (Kotlin, Swift) through its web UI". The documented workflow for native needs is to create a Flutter plugin outside FlutterFlow, publish the repository to GitHub, and add its Git URL as a dependency in the Custom Code settings.

Read that as a cost. Once a package needs native code you control, the dependency becomes a repository you maintain and keep compiling against whatever Flutter version the platform runs. That's a fair trade for a vendor SDK with no alternative and a poor one for a date picker. This is my recommendation, not a documented rule.

Does the cloud builder pin versions you didn't choose?

Evidence from public reports says it can. A community thread on dependency constraints in the Cloud Builder reports that a data-sync package's version 2 line needs newer foundational dependencies than those "globally pinned within the Cloud Builder environment", and that exporting the code and bumping versions locally resolved it.

A second report involves a package the author never added. A FlutterFlow issue opened on 9 September 2026, labelled "status: confirmed" and still open when I checked on 30 September, describes a web deployment failing after enabling Web Push Notifications:

"Because digi_market depends on cloud_functions_web 4.11.2 which depends on web ^1.1.1, web ^1.1.1 is required. So, because digi_market depends on web 1.1.0, version solving failed."

The reporter couldn't find where web 1.1.0 came from in the custom or FlutterFlow dependency lists. This suggests that enabling a platform feature can change your dependency graph without any package appearing in your list, which is why you can't always tell which half of the pubspec is yours.

Which packages are safe inside a FlutterFlow custom widget?

Packages that are pure Dart, declare web support next to mobile, and carry few transitive dependencies are the lowest-risk candidates. No table can promise a build, so this sorts risk and points to the documented behaviour.

Package shapeWhat to checkWhat the docs sayWhat to do
Pure Dart, no platform codeTransitive dependency listCopy every additional dependency's name and versionTry it first, then run the project
UI-only package with web supportWeb chip on pub.devWeb support is required for Run/Test ModeTry it first, then run the project
Plugin with Android or iOS codeWhether you'd have to touch native filesNative code can't be edited in the web UIWrap it in your own Flutter plugin and add it by Git URL
Package without web supportPlatform row on pub.devWeb support is required for Run/Test ModeFind a web-capable alternative
Package that conflicts with a shared dependencyVersion solving errorsShared library dependencies must match exactlyPin an older version, or choose a different package

The plugin row costs the most in template work, because everything in a marketplace template has to work in FlutterFlow's cloud build and each template ships as one package of widgets, instructions, docs and images. One unresolvable dependency holds up the whole submission.

What is a five-minute dependency check?

Run this on the pub.dev page, before any widget code exists:

  1. Read the platform chips. pub.dev's scoring documentation says "The platform support will be detected by analyzing the transitive import graph of the top-level libraries, and finding what core libraries are used." If Web is missing, FlutterFlow's Run/Test Mode requirement is unmet.
  2. Open the Installing tab and count the dependencies. Every transitive package is another constraint, and FlutterFlow tells you to copy them all.
  3. Check whether the package is a plugin. Look for Android and iOS implementations in its repository. If they exist, price the Git-URL route.
  4. Look at the last publish date. FlutterFlow's docs say "A regularly updated package is more likely compatible with the latest Dart/Flutter versions and has fewer bugs."
  5. Read Pub Points as a filter. FlutterFlow describes them as telling "the quality of the dependency (out of 130) based on code style, platform support, and maintainability."
  6. Add it to a throwaway project and run it. This is the only step that is actual proof, and it costs less than discovering the conflict after the widget is wired into four screens.

Steps one to three remove most bad candidates. Step six is the one people skip.

What if the build has already failed?

Work backwards from the change that broke it. This order is my recommendation and not documented FlutterFlow behaviour:

  1. Remove the last dependency you added and rebuild. If the build turns green, the conflict is between that package and something the platform already holds.
  2. Read the version solving error for the package it says is required, then check whether that name appears in your custom dependency list at all. If it doesn't, suspect a platform feature or a transitive dependency.
  3. Try an older major version of your package, or a different package with the same job.
  4. If none of that works and the package is essential, compare it against the Git-URL plugin route before you spend more time on the pubspec.

What changed with Flutter 3.38.5?

FlutterFlow upgraded to Flutter 3.38.5 on Tuesday 3 February 2026. The upgrade announcement mentions "updates to dozens of third-party packages used across FlutterFlow" and says "you may need to make changes to custom code or dependencies." Platform upgrades aren't neutral for custom code, so re-run step six on any widget whose dependency you pinned before a platform upgrade.

If the widget doesn't belong in FlutterFlow at all, when to drop out of FlutterFlow into pure Flutter is the next decision. If you're still choosing a platform, my notes on which no-code tools hit a ceiling cover it, and FlutterFlow with Firebase and Stripe is the stack page.

Open the pub.dev page for the dependency you've already half-decided on and read the platform row. Does Web appear?

Free resource

Free SaaS MVP Scope Template

A Notion document with the full feature checklist, MVP vs. nice-to-have table, pre-build questions, and cost signals — so you walk into any developer call knowing exactly what to ask for.

Get the template →
DL

Dusko Licanin

Full-Stack Developer · Banja Luka, Bosnia

Full-stack developer shipping SaaS MVPs, web apps, and mobile apps using AI-augmented workflows — without agency coordination overhead. Live portfolio: BookBed, Callidus, Pizzeria Bestek.

Frequently Asked Questions

How do I add a pub.dev package to FlutterFlow custom code?

Add it either globally under Settings and Integrations, Project Dependencies, in the Custom Dependencies tab, or locally by pasting the Pubspec Dependency into the bottom-right panel of a custom code file. Both take the package name and an explicit version copied from its pub.dev page. The step people miss is transitive dependencies: FlutterFlow's custom code documentation warns that a dependency "might depend on other dependencies to work", so the name and version of those have to be copied too. Add the package first, then run the project once before you write any widget code around it.

Why does my FlutterFlow build fail after adding a package?

Most often because version solving failed: your package needs a version of something that the project already fixes at a different number, directly or through another dependency. The error names packages you never added, which is why it reads oddly at first. A FlutterFlow issue from September 2026 shows the pattern, with a conflict on the web package that the reporter couldn't locate in either dependency list after enabling a platform feature. Remove the package you just added and rebuild. If the build goes green, the conflict is between that dependency and something else in the graph, and the fix is a different version or a different package.

Which packages work in a FlutterFlow custom widget?

Packages that support web and carry no native code you would need to edit are the most likely to work, though only a test run proves it. UI-only packages such as charts, viewers and layout helpers are the usual candidates. The platform chips on a package's pub.dev page are the fastest filter, and pub.dev's scoring documentation says platform support is detected by analyzing the transitive import graph rather than declared by the author. If Web is absent from that row, FlutterFlow's Run/Test Mode requirement is unmet before you start, so look for an alternative first.

What makes a package unsupported in FlutterFlow?

Two documented causes cover most cases: the package lacks web support, or it needs native platform code that FlutterFlow gives you no way to edit. On the first, FlutterFlow's package guidance states that a package must support Web to run in Run/Test Mode. On the second, the MethodChannels guide says the platform does not allow direct editing of platform-native code through its web UI. A third case is a version conflict with a dependency the project already fixes, where nothing is wrong with the package itself and the fix is a different version.

Can I use a package that needs native Android or iOS code in FlutterFlow?

Yes, but not as a pasted dependency. FlutterFlow's documented path is to create a Flutter plugin outside the platform, implement the Kotlin and Swift sides there, publish the repository to GitHub and add its Git URL as a dependency in the Custom Code settings. That works, and it suits a vendor SDK with no Dart equivalent. Price it honestly, though: you now own a repository that has to keep compiling against whatever Flutter version FlutterFlow runs, and the platform moved to Flutter 3.38.5 on 3 February 2026 on its own schedule. Where a pure-Dart alternative exists, take the alternative.