Loading…

Dartvel, home
Docs
Features
Studio
Cloud
Compared

Search the site

GitHub
pub.dev

GETTING STARTED

Getting started
Existing Flutter apps
Existing Native apps
Run on your phone

APP

UI and styling
Class widgets
Routing
State
Accessibility
Keyboard shortcuts
Localization
Devices and desktop
Native device access
Media, 3D and XR

DATA

Data models
Forms
Search
Sync and offline
Import and export
Change capture
Database
Cache
File storage
Images
Privacy and erasure

BACKEND

Backend functions
Auth and sessions
Authorization
Queues and jobs
Workers and memory
Notifications and mail
Outbound HTTP
AI
Webhooks
GraphQL and OpenAPI
API keys and OAuth
Multi-tenancy
Billing and commerce
Modules

OPERATIONS

Edge security
Secrets and environments
Monitoring
OpenTelemetry
Releases

SHIPPING

Build targets
Static web hosting
Servers and deploying

REFERENCE

Testing
CLI reference
Coding agents

GETTING STARTED

Existing Native apps

Add --brownfield to dartvel build to get what a native app embeds: an Android library, or XCFrameworks for iOS and macOS.

It extends Flutter's add-to-app, so the host starts the project the way it would start any Flutter module.

ON THIS PAGE

Build the artifact a host embeds

Start the project from the host

Adopt an existing Flutter application

Planned host integration

Build the artifact a host embeds

dartvel build android --brownfield
dartvel build ios --brownfield
dartvel build macos --brownfield

Copy code to clipboard

Each command generates the client, then builds the project as a Flutter module in build/brownfield and leaves the result in build/brownfield/<target>: a Maven repository for Android, XCFrameworks for iOS and macOS. Your project is not changed.

Next to the artifact, HOST.md says how the host adds it and which entry point to start.

iOS and macOS frameworks are built with Xcode, so those two commands need a Mac, or --cloud.

Add --debug or --profile for another build mode. Release is the default.

Start the project from the host

Every project gets an entry point named dartvelEmbeddedEntry_<package>. Start an engine there, or start main, which runs the same entry. The project boots as an embedded entry: no single-instance lock and no window of its own, because the host owns the process.

On Android, start several projects from one FlutterEngineGroup so each extra engine costs a few megabytes. On iOS and macOS, call run(withEntrypoint:) on a FlutterEngine.

Adopt an existing Flutter application

dartvel init
dartvel dev

Copy code to clipboard

init adds Dartvel to a Flutter project, and dartvel dev generates the client. Keep its router or adopt file-based pages. A Dartvel application can also mount another Dartvel application with dartvel add.

dartvel add ../checkout

Copy code to clipboard

Planned host integration

Not yet implemented

Brownfield builds for the web (a script and an element the host page places), Linux and Windows. The CLI refuses those targets with the reason instead of building an app a host cannot embed.

A generated, typed host API: mount and unmount routes, and messages both ways.

Host back navigation, lifecycle and verified session hand-off.

Several projects in one module (--integrated), and projects on different versions side by side.

The Brownfield section in NEW_SPEC.md records the full design and the order it is built in.

PREVIOUS Existing Flutter apps Add Dartvel to an app you already have
NEXT Run on your phone Pair a development build with dartvel dev
GitHub
pub.dev
npm
Acknowledgements
Privacy
Terms

FSL-1.1-MIT licensed. Built with Dartvel.

Dartvel is made by

SigmaDev Digital

To the bottom