Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages

Help for owners

My old Flutter app no longer compiles

Short answer

An unmaintained Flutter app often fails because the tools around it moved on. Dart 3 requires null safety, so packages that were never migrated stop resolving. The code is usually recoverable, but it needs a planned update to current versions, not a quick patch. Save a copy first and do not delete anything.

  • Written for business owners
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Does this sound like your situation?

  • The app has not been updated for a long time and will not build now.
  • The first error mentions version solving or an SDK constraint.
  • A package says it does not support null safety.
  • The developer who built it is no longer around.
  • I need a small change but nobody can compile the project.

Why does this happen?

  1. Dart 3 makes null safety mandatory

    The Dart 3 migration guide states that null safety is built in and cannot be turned off. Code written before that has to be migrated.

  2. Packages that were not migrated fail to resolve

    The same guide says packages without null safety make pub get fail during version solving, and that libraries below the minimum language version cause errors.

  3. Migration tools were removed

    dart migrate and related commands no longer exist in Dart 3, so the old shortcut is gone. The guide says to migrate with an older Dart SDK first, which needs care.

  4. Version ranges and the lock file decide what is installed

    Dart packages declare a range of acceptable versions, and a lock file records the exact versions chosen. If the lock file is missing, the build may pick versions that differ from what the app was built with.

What can I do about it today?

  1. Copy the whole project folderBefore anyone touches it, store a full copy, including the lock file and any key or signing files. This is the single most useful step.
  2. Find the original toolsAsk whoever built it for the Flutter version, or look for the version in project files. Do not guess.
  3. Check who owns the store accountsThe app stays live while the code is stuck. Make sure you still control the developer accounts.
  4. Do not rewrite from scratch yetA rewrite is costly and rarely needed. Ask for an assessment of how much of the app is reusable.
  5. List the changes you actually needA short list of must-have changes helps a developer judge the size of the job.

When should I bring someone in?

  • You do not have the source code or only part of it.
  • A store requirement forces an update soon.
  • Several packages in the project are abandoned.

How do I handle it?

  1. Assess before promising anythingI try to build the project, list each blocker and tell you which are packages, which are code and which are tools.
  2. Migrate in the order the tools requireNull safety first where the old tools are needed, then the move to current Dart and Flutter, with the app running at each step.
  3. Replace what cannot be savedAbandoned packages are swapped for maintained ones, and I explain each swap.
  4. Hand back something maintainableYou get a project that builds on current tools, a short note on how to build it, and the store release prepared with you.

The price depends on what I find, so I quote in writing after a short discovery call. Tell me what is happening and I reply within 24 hours.

What do owners ask about this?

Is my old app lost?

Usually not, if the code exists. The work is bringing it up to current versions.

Why does the lock file matter?

Dart's documentation says it records the concrete version of every dependency and should be committed for apps, so it helps rebuild the same versions.

Is a rewrite cheaper?

Not always. After an assessment, it is easier to compare updating with rebuilding.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Found a mistake? Tell me.

For your developer: the technical fixes

Next step

Want this off your desk?

Send me a few lines on where things stand. I reply within 24 hours.