Skip to content

Importing a Project

Already have a Flutter app? Instead of starting from a prompt, you can upload your project as a ZIP file. Primio sets it up as a new project with a live preview, and from there you keep working on it in chat like any other Primio project.

Import works for any Flutter app: one you wrote yourself, one a developer handed over, or a project you previously exported from Primio with Code Export.

  • You need a Flutter project. The folder you zip must contain a pubspec.yaml file. Projects built with other frameworks (React Native, native Android or iOS, web apps, and so on) can’t be imported.
  • You need at least 20,000 tokens, the same minimum as creating a new project. Primio uses tokens while it sets up your project. See Token System.
  • The ZIP must be 100 MB or smaller.

Zip the folder that contains pubspec.yaml. You can zip the folder itself or just its contents. Both work.

If your project sits inside a larger repository, for example in a mobile/ or app/ subfolder, you can still upload the whole repository. Primio finds the Flutter project, moves it to the project root, and keeps everything else in a primio_moved folder so nothing is lost.

To keep the ZIP small, you can leave out generated folders. Primio ignores these anyway:

  • Build output: build/, .dart_tool/, .gradle/, Pods/, node_modules/
  • Version control and CI: .git/, .github/
  • Editor settings: .idea/, .vscode/
  • OS files: .DS_Store, __MACOSX, Thumbs.db
  1. Open the import dialog

    On the Primio home page, click the + button in the prompt box and choose Import Flutter project. If you’re not signed in, Primio asks you to sign in first.

  2. Upload the ZIP

    Drag your .zip file into the dialog, or click browse to pick it.

  3. Start the import

    Click Import my app in the prompt box. Primio uploads the file, then opens your new project and shows Importing project… while it unpacks the files. Larger projects take a bit longer.

  4. Follow the setup in chat

    Primio checks and sets up the project. You can watch each step in the chat. When it’s done, the live preview loads and Primio posts a short summary of what it set up.

Add instructions to your import (optional)

Section titled “Add instructions to your import (optional)”

Anything you type or attach in the home page prompt box before clicking Import my app is sent with the import. Use this to ask for changes right away, for example:

  • “After importing, switch the app to a dark theme.”
  • “Replace the home screen layout with the attached mockup.”

If you leave the prompt box empty, Primio only imports and sets up the project, and you can ask for changes once it’s ready.

Primio does not just copy your files. It prepares the project so the preview, builds, and AI changes work the same as for a project created in Primio.

Checks the project. Primio confirms the upload is a Flutter app and that the project sits at the root. If it isn’t a Flutter project, the import stops and the chat explains why.

Reads your project settings. Primio picks up the following from your code and uses them as the project’s settings:

  • App name
  • Android package name and iOS bundle ID
  • App version
  • Flutter version your project needs
  • Platforms your project supports (Android, iOS, web)
  • App icon

Fills in what’s missing. If the project has no app icon, Primio can create one. If a platform needed for the preview or for builds is missing, Primio can add it. Primio may also adjust build settings that are too low for its build servers, for example Android build memory.

Learns your codebase. Primio reads through the project and writes a PRIMIO.md file at the project root that describes the app’s structure, screens, and conventions. The AI uses it to make better changes later. If you’re re-importing a project that came from Primio and already has PRIMIO.md, Primio keeps the existing file.

Carries out your instructions. If you added a message or attachments, Primio makes those changes next.

Builds the preview. Primio builds the web preview. If the build fails, for example because of outdated packages or code that doesn’t compile, Primio tries to fix the errors automatically and builds again.

An imported project is a regular Primio project. You can:

Primio may have changed some files during setup. You can review them in the File Browser.

  • ZIP upload only. You can’t import directly from a GitHub repository or a URL yet.
  • Flutter projects only. The upload must contain a Flutter app with a pubspec.yaml.
  • Size limits. The ZIP can be up to 100 MB. Unpacked, it can hold up to 500 MB and 20,000 files.
  • One-time snapshot. An import copies your project into Primio once. Later changes to your local copy or repository don’t sync into Primio. To bring in a newer version, import it again as a new project.
  • Web preview limits apply. Some plugins, such as camera, Bluetooth, and sensors, don’t run in the web preview. Use device builds to test them. See Supported Platforms & Limits.
  • Very old or unusual projects may need help. Primio fixes common build problems automatically, but projects that depend on very old Flutter versions, private packages, or custom build steps may still fail to build. You can then ask the AI in chat to fix the remaining issues.

“Only .zip files are supported”. Compress the project folder as a .zip. Other archive formats such as .rar, .7z, and .tar.gz aren’t supported.

“ZIP is larger than 100 MB”. Delete generated folders such as build/, .dart_tool/, Pods/, and .git/ before zipping. Large media files in assets/ also add up. Consider moving them out and adding them later.

“This file isn’t a valid ZIP archive”. The file is damaged, password-protected, or not really a ZIP. Compress the project folder again with your system’s built-in ZIP tool.

“No pubspec.yaml found”. Make sure the ZIP includes the folder with pubspec.yaml, not only the lib/ folder. Files inside build/ and .dart_tool/ aren’t counted.

“pubspec.yaml found, but it isn’t a Flutter app”. The pubspec.yaml in the ZIP doesn’t list flutter: sdk: flutter under dependencies, so it’s a plain Dart package rather than a Flutter app.

“Project is too large when unpacked”. The unpacked project must stay under 500 MB and 20,000 files. Delete generated folders such as build/, .dart_tool/, Pods/, and .git/ before zipping.

“Not enough tokens to start a new project”. You need at least 20,000 tokens to import. Upgrade your plan or wait for your tokens to renew. See Plans & Pricing.

“Could not import the project. Please try again.” The upload didn’t go through. Check your connection and try again.

The import stopped because the project isn’t a Flutter project. Make sure the ZIP includes the folder with pubspec.yaml, not only the lib/ folder or a parent folder without the project files.

The preview didn’t build. Primio tries several times to fix build errors. If it still fails, describe the problem in chat or paste the error, and the AI will keep working on it. See Debugging & Fixing Errors.