This tool converts Figma designs to Flutter code by exporting screens as PNG images and generating corresponding Flutter widget code using AI services (Claude or GPT).
- Fetches Figma file data
- Lists available screens and allows user selection
- Exports selected screens as PNG images
- Generates Flutter widget code for each selected screen using Claude or GPT
- Saves generated code in separate files
- Clone the repository
- Run
npm install
to install dependencies - Copy
.env.example
to.env
and fill in your Figma personal access token, file key, and AI service API keys - Run
npm start
to execute the tool
- The tool will fetch and list all available screens from your Figma file
- Select the screens you want to convert
- Choose between Claude and GPT for code generation
- The tool will export screenshots and generate Flutter code for the selected screens
FIGMA_PERSONAL_ACCESS_TOKEN
: Your Figma personal access tokenFIGMA_FILE_KEY
: The key of the Figma file you want to convertOUTPUT_FOLDER
: The folder where generated files will be saved (default: 'output')CLAUDE_API_KEY
: Your Claude API keyGPT_API_KEY
: Your GPT API key
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.