Flutter

This template helps you generate your design tokens in a dart file and icons as SVG files.

This example uses the following parsers:

  • to-flutter to generate your design tokens as dart files

  • svgo to optimize and generate icons as SVG files

If you use the CLI, you need to fill three properties:

  • repository is @organization/repository

  • personalAccessToken which you can generate in your account settings

  • rules are where you provide parsers and compatible options

{
  "version": "2",
  "repository": "@organization/repository",
  // Only use the personalAccessToken when working with the CLI
  "personalAccessToken": "<your-personal-access-token>",
  "rules": [
    {
      "name": "Generate tokens for Flutter",
      "parsers": [
        {
          "name": "to-flutter",
          "output": {
            "type": "file",
            "filePath": "public/tokens.dart"
          }
        }
      ]
    },
    {
      "name": "Optimize and generate icons as SVG files",
      "parsers": [
        {
          "name": "svgo",
          "output": {
            "type": "directory",
            "directoryPath": "public/vectors"
          }
        }
      ]
    }
  ]
}

Last updated