The morphr sync
Command
The sync
command is essential for keeping your Flutter app in sync with your latest Figma designs. It fetches the most recent version of your Figma file and makes it available to your app.
Basic Usage
morphr sync
When run inside a Flutter project initialized with Morphr, this command will:
- Look for your project configuration in
lib/morphr_options.dart
- Connect to Morphr Cloud using your credentials
- Fetch the latest version of your linked Figma file
- Make it available for your app to use
When to Use
You should run morphr sync
:
- After making changes to your Figma design
- When you want to test the latest design changes in your app
- Before building a new version of your app
- Any time you need to ensure your app has the most current design
Command Options
If you have multiple Morphr projects, you can specify which project to sync:
morphr sync --project-id="123456"
Or using the short form:
morphr sync -p 123456
How It Works
- The command reads your project configuration from
lib/morphr_options.dart
- It authenticates with Morphr Cloud using your stored credentials
- It requests a sync operation for your specific project
- Morphr Cloud connects to Figma's API and fetches the latest version of your file
- The Figma file is processed and prepared for use in your Flutter app
- Your app can now use the updated designs when it runs
Automatic Project ID Discovery
If you don't specify a project ID, the sync
command will automatically:
- Look for the
lib/morphr_options.dart
file - Extract the project ID from your configuration
- Use that project ID for synchronization
This means you typically don't need to remember or specify your project ID when working in a project initialized with Morphr.