mark-nicepants / figma2flutter

Converts design token json files to flutter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Negative numbers (`-`) in a size name isn't supported (Low Priority)

kvenn opened this issue · comments

ℹ️ Info

Version: v0.3.0-beta

💬 Description

If there are two values, one with the name 4 and the other with the name -4, the generator will generate them both as

EdgeInsets get globalSpacing4 => const EdgeInsets.all(4);
EdgeInsets get globalSpacing4 => const EdgeInsets.all(-4);

Suggestion

Replace the - with neg or negative

EdgeInsets get globalSpacing4 => const EdgeInsets.all(4);
EdgeInsets get globalSpacingNegative4 => const EdgeInsets.all(-4);

📜 tokens file you tried to import

{
  "global": {
    "spacing": {
      "-4": {
        "value": "-4",
        "type": "spacing"
      }
      "4": {
        "value": "4",
        "type": "spacing"
      }
  }
}

#38 has been merged