aloisdeniel / aloisdeniel/figma-to-flutter

Produced Invalid Code

Abierto
#15 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Dart
Estrellas
875
Forks
135
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Code produced has syntactic errors:
- doesn't handle string with ' (as in plural like Sam's dog)
- text blocks don't line wrap property by default
- `flutter_svg` struggles with some of the Figma generated SVG files eg.
```════════ Exception caught by SVG ═══════════════════════════════════════════════════════════════════
The following FormatException was thrown resolving a single-frame picture stream:
Invalid radix-10 number (at character 1)
109.00000110268593
```
- comma and semicolon errors
- pubspec.yaml code generated is in the wrong order eg. fonts before dependencies
- identifies packages like `flutter_svg` for the pubspec but then does not provide the `import` statement
- no trailing commas (so makes dartfmt struggle to clean up the code) as [per recommendation](https://flutter.dev/docs/development/tools/formatting#using-trailing-commas)
- flags PNG and SVG assets (assume they go into `/assets/images/` but then does not add them in assets to `pubspec.yaml`

This is just to start. So this is promising but I need to spend lots of time fixing the generate code to just be syntactically correct at a minimum before I can run a build. So I'm not saving much time, except on very complex layouts.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.