Pulled version 0.1.1-alpha from GitHub.
Version on Pub.dev however is still 0.1.0-alpha (that version is used if you activate the package using dart pub global activate figma2flutter).
:speech_balloon: Description
First of all, @mark-nicepants thank you for this awesome package!
I've been trying out the package but there are 2 small bugs that I've noticed.
The generated output is not correct, and I think I've found the reason for it.
In the tokens.g.dart file the generated class DefaultRadiiTokens tokens returns a const BorderRadius.zero which is not possible, since there is no const constructor for BorderRadius.zero. The same goes for DefaultSpacingTokens, where a const EdgeInsets.zero can be returned, which is not possible either since there is no const constructor for EdgeInsets.zero.
I tried to make a PR, but I have no permissions it said when I tried to push the PR. I noticed how ever that the bug for the DefaultSpacingTokens class is fixed in version 0.1.1-alpha, but because the version 0.1.0-alpha is being used (that's the version on pub.dev) the files still generate the wrong output.
I fixed those little bugs locally on my machine, but another error came to light when I did that. I tried to activate the local package by using dart pub global activate --source path <local dir>, so I am able to run the figma2flutter --input <input json> --output <output dir> with the fixed bugs. This however did not work because the paths are hardcoded in version 0.1.1-alpha in the figma2flutter.dart file, instead of using the values from the parameters.
Edit: I missed the commented lines above the part were the paths were hardcoded, so locally on my machine I uncommented the variables that take the values supplied for the input and output parameters, and commented the hardcoded lines and that worked!
Summary / TL;DR:
DefaultRadiiTokens class still contains a const BorderRadius.zero which will not work.
Version on pub.dev is behind (0.1.0-alpha is being used, instead of 0.1.1-alpha).
figma2flutter --input --output does not work in version 0.1.1-alpha due to hardcoded values in the figma2flutter.dart file.
:information_source: Info
Pulled version 0.1.1-alpha from GitHub. Version on Pub.dev however is still 0.1.0-alpha (that version is used if you activate the package using
dart pub global activate figma2flutter
).:speech_balloon: Description
First of all, @mark-nicepants thank you for this awesome package!
I've been trying out the package but there are 2 small bugs that I've noticed.
The generated output is not correct, and I think I've found the reason for it. In the
tokens.g.dart
file the generated classDefaultRadiiTokens
tokens returns aconst BorderRadius.zero
which is not possible, since there is noconst
constructor forBorderRadius.zero
. The same goes forDefaultSpacingTokens
, where aconst EdgeInsets.zero
can be returned, which is not possible either since there is noconst
constructor forEdgeInsets.zero
.I tried to make a PR, but I have no permissions it said when I tried to push the PR. I noticed how ever that the bug for the
DefaultSpacingTokens
class is fixed in version 0.1.1-alpha, but because the version 0.1.0-alpha is being used (that's the version on pub.dev) the files still generate the wrong output.I fixed those little bugs locally on my machine, but another error came to light when I did that. I tried to activate the local package by using
dart pub global activate --source path <local dir>
, so I am able to run thefigma2flutter --input <input json> --output <output dir>
with the fixed bugs. This however did not work because the paths are hardcoded in version 0.1.1-alpha in thefigma2flutter.dart
file, instead of using the values from the parameters.Edit: I missed the commented lines above the part were the paths were hardcoded, so locally on my machine I uncommented the variables that take the values supplied for the input and output parameters, and commented the hardcoded lines and that worked!
Summary / TL;DR:
DefaultRadiiTokens
class still contains aconst BorderRadius.zero
which will not work.figma2flutter --input --output
does not work in version 0.1.1-alpha due to hardcoded values in thefigma2flutter.dart
file.:scroll: tokens file you tried to import
Not applicable