mirror of
https://github.com/storytold/figcraft.git
synced 2026-10-28 12:26:52 -06:00
variable.export takes format "dart", and Local variables > Export... offers "Dart constants for Flutter...". The file has an abstract final class per collection and mode (the default mode named after the collection, the others after the collection and the mode) with a static const Color, double, String or bool per variable. Names become camelCase Dart identifiers, kept apart when two read the same, with reserved words escaped; strings are escaped for Dart; aliases are resolved to their value in that mode, so each class stands alone. A generated file passes the Flutter analyzer and its constants work in const widgets.