mark-nicepants/figma2flutter

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

kvenn opened this issue · 1 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