Cogwheel is part of the Family Ecosystem →
Skip to main content

Flutter

Cogwheel makes it easy to automate the configuration of your Flutter projects. Currently, Cogwheel supports iOS and Android projects only.

Configuration Tool

To use the Configuration-driven experience, first create a yaml file using the options available:

Here's an example:

config.yaml
platforms:
android:
manifest:
- file: AndroidManifest.xml
target: manifest/application
inject: <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
ios:
targets:
App:
version: 16.4
npm install @cogwheel-dev/configure
npx cogwheel run config.yaml

API

Flutter projects usually have platform projects in a single project directory. Thus, pass the main project directory to the MobileProject constructor, and then pass the names of the ios and android directories relative to the root:

import { MobileProject, MobileProjectConfig } from '@cogwheel-dev/project';

const config: MobileProjectConfig = {
ios: {
path: 'ios',
},
android: {
path: 'android',
},
};

const project = new MobileProject('/path/to/project/dir', config);
await project.load();