It's OK to love Flutter and hate hand-coding design elements. Parabeac-Core converts design files into Flutter code.

Overview

Parabeac-Core

Parabeac Logo

Parabeac-Core converts design files into Flutter code driven by open-source & community.

Parabeac - Open-source design to Flutter converter | Product Hunt Embed

Discord Chat https://twitter.com/parabeac?lang=en Contributor Covenant bravemaster619's DEV Profile

Contribute · Discord Community · Designer Protocol · Debugging

Table of Contents

  1. Why are we here?

  2. Get Started

    1. Cloning the Repo
    2. Running the conversion
    3. Metrics
    4. Using State Management Configuration
  3. How to contribute

  4. Running the exported Code

  5. How to create & run Parabeac eggs

  6. How it works

Why are we here?

The handoff between designers & developers is one of the most costly and frustrating bottlenecks in app development. And as design iteration becomes more critical in the execution of app development, this problem is only going to get worse. We believe we can fix it. What if designers had a tool to automatically convert their design files into high quality code? That is exactly what we are creating with Parabeac-Core. With the push of a button, Parabeac-Core could interpret design files and produce high quality Flutter code.

Our goal is to create a tool that passes a modern Turing Test: automatic code generation so good that it is indistinguishable from code written by human developers. Pretty cool, right? We welcome all designers & developers to join our community!

Get Started

If you have any trouble with getting Parabeac-Core running you can watch our macOS or Windows tutorial here! Parabeac-Core Getting Started macOS

Development on Windows requires some extra setup.

Parabeac-Core currently supports Figma and Sketch. Be sure to follow the designer protocol to achieve the highest quality output.

Dependencies

Feel free to download one of our sample design files below.

  • Sketch
    • The Sketch API is only available on MacOS, conversions will be missing images if you run on non-MacOS systems.
  • Figma
    • You will need to duplicate the Design to your account if you're using Figma

Cloning the Repo

Because parabeac-core contains the Sketch-Asset-Converter submodule, it is easier to clone the repo using the following command:

git clone --recurse-submodules https://github.com/Parabeac/Parabeac-Core.git

If you have already cloned the repo without the submodule, simply run the following command which will add Sketch-Asset-Converter:

git submodule update --init

In order to pull new changes from the repository, run the following command to also update the submodule:

git pull --recurse-submodules

For more information about git submodules, click here.

Running the conversion

We currently support both Sketch and Figma. See below for running the conversion for both Sketch and Figma.

Sketch

Follow these steps in order to run Parabeac Core on your local environment:

  1. Clone PBCore repo in order to get the code on your machine
  2. If you have any plugins make sure to put the plugins in the plugin folder
  3. In your terminal change directory to the root PBCore directory and run:
 $ pub get
 $ dart parabeac.dart -p <Absolute Path To Design File> -n <ProjectName> 

Figma

  1. Clone PBCore repo in order to get the code on your machine
  2. If you have any plugins make sure to put the plugins in the plugin folder
  3. In your terminal change directory to the root PBCore directory and run:
 $ pub get
 $ dart parabeac.dart -f <Figma File ID> -k <Figma API Key> -o <Absolute Path To Output Directory> 

If you're wondering about where to find your Figma File ID or Figma API Key Please Read Below:

Figma File ID and API Key

Since Figma operates from a cloud native approach we use the Figma File ID and a Figma User API Key in order to pull down your figma designs and run the conversion. Your Figma File ID is a unique ID used to identify your specific Figma File amoungst all other Figma Design Files. Your Figma API Key is a custom key assigned to your figma account that you generate in order to give Parabeac Core the ability to pull down your Figma File. In order to find your Figma File ID do the following:

  1. Go to your Figma Homepage at www.Figma.com
  2. Select your Design File
  3. Within your design File's URL is your Figma File ID. Simply take the value after Figma.com/file/. So in the URL https://www.figma.com/file/zXXWPWb5wJXd0ImGUjEU1X/parabeac_demo_alt?node-id=0%3A156 the Figma File ID is zXXWPWb5wJXd0ImGUjEU1X

In order to create a Figma API Token do the following:

  1. Go to your Figma Homepage at www.Figma.com
  2. Navigate to your user Profile
  3. Scroll Down to the "Create a new Personal Access Token"
  4. Create a new Personal Access Token with the name Parabeac, you should then be prompted with your new API Key. Make sure to copy this as you wont be able to access it again after you click confirm. (It should look something like this: 64522-a0e5509a-d5ce-47a8-880b-c295f9cb27ed

Metrics

Parabeac-Core keeps track of a few data points to help us understand usage. Although we do not collect any personal information, you can turn off metrics at any time by creating the environment variable PB_METRICS = "false".

Using State Management Configuration

State Management

Parabeac-Core is able to export to different state management systems such as BLoC & Provider. Every developer team creates their Flutter apps differently, we added this support to help map the conversion in a more thoughtful & custom way. See here for the release post for more details!

To set the state management configuration, head over to edit /Parabeac-Core/lib/configurations/configurations.json. In here you'll see code like the following

 {
    "default": {
        "widgetStyle": "Material",
        "widgetType": "Stateless",
        "widgetSpacing": "Expanded",
        "layoutPrecedence" : ["column", "row", "stack"]
    },
    "state-management" : "None"
}

Here you can replace the state-management property to bloc, provider, or riverpod.

For sample Sketch and Figma files you can use to test state management, please see Get Started or see here to understand how to set up your design file.

If we don't support your state management system, you can learn how to easily create your own state management configuration in the wiki, let us know if you're thinking about doing this, we're here to help! :)

How to contribute

Welcome! The best way to contribute to Parabeac is through pull requests, filing issues on Github, writing documentation & helping others in our Discord community. We are an early project, but like many other projects, helping with bugs that others have filed on Stack Overflow is extremely helpful. We recommend filing bugs & feature requests on the Github issue tracker. For more details make sure to check out our wiki.

Running the exported code

Requirements

  • Flutter
  • Dart

Steps

  1. Make sure you have flutter installed correctly. (You can run flutter doctor within your terminal to easily check)
  2. Move to the Flutter Projects Root Directory

If your Project utilizes Sketch Prototyping Skip to Step 5

  1. Within Main.dart import the main screen that you want the app to launch with from the screens folder
  2. Next change the home property of the MaterialApp that is being returned in the Build Method to the name of the Screen imported in Step 3
  3. Save Main.dart and Execute flutter run in your terminal

How to create & run Parabeac eggs

Parabeac eggs are essentially plugins that change the way a set of design elements are interpreted. A very simple example of this are 2 eggs that we created called NavBar & TabBar. Eggs are loaded into the project before the runtime of Parabeac-Core because unfortunately dart doesn't support dynamic module loading.

You can also create your own eggs! By using our Parabeac Egg Template you can quickly define your own semantics and corresponding code generation which allows for the most flexible and robust export customization possible. You can also upload your eggs to our git-based marketplace for templates to help support the community going forward.

To add a Parabeac egg, download the egg and add it to the parabeac-core/plugins folder. When you run Parabeac-Core it will automatically grab & import the egg into the project.

How it works

Parabeac-Core is essentially broken up into 3 pieces which you can see in the list or animation below. While most of the magic is in the interpretation engine, you can view more animations & information here.

  1. Convert design file into Parabeac design protocol
  2. Interpretation Engine

Made up of the Visual, Layout, & Alignment generation services.

  1. Generate Flutter code

Parabeac High Level Animation

Parabeac Design Protocol

The Parabeac Design Protocol helps designers define UI/UX elements within Design Files for cleaner and more succinct code conversion. We go in depth on the design protocol but the following are things available to improve the conversion.

  • Naming Semantics: Naming semantics are what trigger eggs.
  • Symbols: Symbols define reusable items so that developers can reuse the code generated.
  • Describing States: By using the naming convention of seperating the name of the element and the name of the state that the element is in like the following, nameOfElement/default & nameOfElement/onClicked you can describe different states which are exported to the state management system the development team configured.
Comments
  • Parameter/Override Names aren't filtering through

    Parameter/Override Names aren't filtering through

    As discussed with Eddie a couple of weeks ago, the override names aren't being set in the class, but the UUID is.

    If somebody can fix this soon it should be fairly easy. Right now the overrides will use UUID like 54334-343-3434334-34334_strvalue for the name which just bloats the code uncessarily.

    High Priority Code-Generation 
    opened by SuperGNUS 10
  • Feature/pb 181 implement new rules for autolayout

    Feature/pb 181 implement new rules for autolayout

    New rules were already implemented, but there was some mistakes on how they were handle. Now new rules should be correctly represented also changed positioned & container to better match the rules

    opened by SushiRoll53 6
  • Sketch To Flutter Code Conversion

    Sketch To Flutter Code Conversion

    1. Created a simple sketch file trying to replicate how the demo sketch layer out it's components.
    2. Opened the terminal to the the Parabeac-Core Directory, and entered the command to convert the Sketch file to flutter code.
    3. Got the following messages on the terminal:

    [INFO]: Installing Para-beac core and its dependencies

    audited 525 packages in 4.62s

    34 packages are looking for funding run npm fund for details

    found 1 moderate severity vulnerability run npm audit fix to fix them, or npm audit for details

    Installed Sketch Asset Converter dependencies

    Error: Error when reading 'pub': No such file or directory npm WARN [email protected] No repository field. npm WARN [email protected] No license field.

    [INFO]: No URL provided

    [INFO]: Processing plugins...

    [INFO]: Plugin already in file. Skipping...

    [ERROR]: No semantics found for Tab

    [INFO]: Plugin already in file. Skipping...

    [INFO]: Plugin already in file. Skipping...

    [INFO]: Done processing!

    Main: [INFO] - [-p, /Users/saidajo/Desktop/magic_calculator.sketch, -n, MagicTest]

    Sketch: [INFO] - We encountered a page that has 0 page items.

    Sketch: [INFO] - We encountered a page that has 0 page items.

    Interpret: [ERROR] - NoSuchMethodError: The getter 'boundaryRectangle' was called on null. Receiver: null Tried calling: boundaryRectangle

    PBAlignGenerationService: [WARNING] - We don't support class type Null for adding to the queue.

    lib/main.dart: Warning: Interpreting this as package URI, 'package:parabeac_core/main.dart'. Unhandled exception: NoSuchMethodError: The getter 'name' was called on null. Receiver: null Tried calling: name #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5) #1 Interpret._generateGroup (package:parabeac_core/controllers/interpret.dart:85:31) #2 Interpret.interpretAndOptimize (package:parabeac_core/controllers/interpret.dart:64:49) #3 SketchController.convertSketchFile (package:parabeac_core/controllers/sketch_controller.dart:31:38) #4 main (package:parabeac_core/main.dart:86:30) #5 _RootZone.runUnary (dart:async/zone.dart:1450:54) #6 _FutureListener.handleValue (dart:async/future_impl.dart:143:18) #7 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45) #8 Future._propagateToListeners (dart:async/future_impl.dart:725:32) #9 Future._completeWithValue (dart:async/future_impl.dart:529:5) #10 Future._asyncCompleteWithValue. (dart:async/future_impl.dart:567:7) #11 _microtaskLoop (dart:async/schedule_microtask.dart:41:21) #12 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5) #13 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13) #14 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)

    1. After Getting these messages I entered nom audit to get details from the first message saying that their was a nom vulnerability and got the following message:

    npm ERR! code EAUDITNOPJSON npm ERR! audit No package.json found: Cannot audit a project without a package.json

    bug question 
    opened by DepressoExpressoBoi 6
  • Stack reduction to Container(child: Container) is not working

    Stack reduction to Container(child: Container) is not working

    This seems to be an issue relating to the post-layout rules. The attached photo shows a Stack with a background container & another container. It should've been reduced to a Background Container holding the Text Container. Another issue but unrelated is in the Login button. You can see that the alignment service did not inject a Positioned for the relationship between the Stack & its children which resulted in incorrect looking UI.

    Screen Shot 2020-09-14 at 4 31 04 PM Screen Shot 2020-09-14 at 4 35 32 PM bug High Priority Layout Service HacktoberFest RequiresTest 
    opened by siliconivan 6
  • Parabeac trashes main.dart on exception

    Parabeac trashes main.dart on exception

    If you create a group inside Sketch with no children, Parabeac will except out and your main.dart file will become blank.

    You can regenerate it, but you lose any changes you have added.

    bug help wanted High Priority hotfix HacktoberFest 
    opened by SuperGNUS 5
  • Change Semantic detection for `.*` to `<>`

    Change Semantic detection for `.*` to `<>`

    This has been discussed with the Parabeac team, but this would be a more natural approach to applying a naming semantic. It doesn't make or break anything but would be a better UX on the Sketch side.

    enhancement good first issue Low Severity High Priority Proposal HacktoberFest 
    opened by siliconivan 5
  • Failed at compilation

    Failed at compilation

    A clear and concise description of what the bug is.

    Just cloned the project and tried running

    dart parabeac.dart -p /Users/faridgarciayala/Desktop/Parabeac-Core/test/assets/SymbolTest-simp.sketch  -n test
    

    I got the following error:

    Align Generator: [ERROR] - NoSuchMethodError: The method 'addImport' was called on null. Receiver: null Tried calling: addImport("package:auto_size_text/auto_size_text.dart")

    Project Builder: [ERROR] - ProcessException: No such file or directory Command: flutter create /Users/faridgarciayala/Desktop/Parabeac-Core/test/assets/test

    Provider: [INFO] - Thanks for trying our state management configuration that is now in Beta! If you run into any issues please feel free to post it in Github or in our Discord! Provider: [INFO] - Setting up the directories

    Align Generator: [ERROR] - NoSuchMethodError: The method 'addImport' was called on null. Receiver: null Tried calling: addImport("package:auto_size_text/auto_size_text.dart")

    lib/main.dart: Warning: Interpreting this as package URI, 'package:parabeac_core/main.dart'. Unhandled exception: FileSystemException: Cannot open file, path = '/Users/faridgarciayala/Desktop/Parabeac-Core/test/assets/test/pubspec.yaml' (OS Error: No such file or directory, errno = 2) #0 _File.throwIfError (dart:io/file_impl.dart:635:7) #1 _File.openSync (dart:io/file_impl.dart:479:5) #2 _File.readAsBytesSync (dart:io/file_impl.dart:539:18) #3 _File.readAsStringSync (dart:io/file_impl.dart:584:18) #4 _File.readAsLinesSync (dart:io/file_impl.dart:590:36) #5 PBFlutterWriter.submitDependencies (package:parabeac_core/generation/generators/writers/pb_flutter_writer.dart:71:38) #6 GenerationConfiguration._commitDependencies (package:parabeac_core/generation/generators/value_objects/generation_configuration/pb_generation_configuration.dart:155:14) #7 GenerationConfiguration.generateProject (package:parabeac_core/generation/generators/value_objects/generation_configuration/pb_generation_configuration.dart:122:11) #8 ProviderGenerationConfiguration.generateProject (package:parabeac_core/generation/generators/value_objects/generation_configuration/provider_generation_configuration.dart:30:17) #9 FlutterProjectBuilder.convertToFlutterProject (package:parabeac_core/generation/flutter_project_builder/flutter_project_builder.dart:127:35) #10 Controller.convertFile (package:parabeac_core/controllers/controller.dart:55:15) #11 SketchController.convertFile (package:parabeac_core/controllers/sketch_controller.dart:37:17) #12 main (package:parabeac_core/main.dart:166:24) #13 _RootZone.runUnary (dart:async/zone.dart:1450:54) #14 _FutureListener.handleValue (dart:async/future_impl.dart:143:18) #15 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45) #16 Future._propagateToListeners (dart:async/future_impl.dart:725:32) #17 Future._complete (dart:async/future_impl.dart:519:7) #18 _StreamIterator._onDone (dart:async/stream_impl.dart:1087:20) #19 _RootZone.runGuarded (dart:async/zone.dart:1372:10) #20 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:410:13) #21 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:420:15) #22 _BufferingStreamSubscription._close (dart:async/stream_impl.dart:305:7) #23 _SinkTransformerStreamSubscription._close (dart:async/stream_transformers.dart:97:11) #24 _EventSinkWrapper.close (dart:async/stream_transformers.dart:23:11) #25 _StringAdapterSink.close (dart:convert/string_conversion.dart:251:11) #26 _Utf8ConversionSink.close (dart:convert/string_conversion.dart:305:20) #27 _ConverterStreamEventSink.close (dart:convert/chunked_conversion.dart:82:18) #28 _SinkTransformerStreamSubscription._handleDone (dart:async/stream_transformers.dart:142:24) #29 _RootZone.runGuarded (dart:async/zone.dart:1372:10) #30 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:410:13) #31 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:420:15) #32 _BufferingStreamSubscription._close (dart:async/stream_impl.dart:305:7) #33 _SyncStreamControllerDispatch._sendDone (dart:async/stream_controller.dart:816:19) #34 _StreamController._closeUnchecked (dart:async/stream_controller.dart:671:7) #35 _StreamController.close (dart:async/stream_controller.dart:664:5) #36 _Socket._onData (dart:io-patch/socket_patch.dart:2051:21) #37 _RootZone.runUnaryGuarded (dart:async/zone.dart:1384:10) #38 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:357:11) #39 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:285:7) #40 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:808:19) #41 _StreamController._add (dart:async/stream_controller.dart:682:7) #42 _StreamController.add (dart:async/stream_controller.dart:624:5) #43 new _RawSocket. (dart:io-patch/socket_patch.dart:1587:35) #44 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1069:18) #45 _microtaskLoop (dart:async/schedule_microtask.dart:41:21) #46 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5) #47 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13) #48 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)

    AB#755

    bug 
    opened by faridg18 4
  • Use Dart generator naming conventions .g.dart

    Use Dart generator naming conventions .g.dart

    Change Proposal

    Use the .g.dart output for generated files and only generate .dart files if they don't exist. This should use darts way of importing or separating abstract/generated classes.

    Module and Current Solution

    Generation modules outputs .dart files which are really generated files.

    Benefits of the Change

    Allows the developer to overwrite those .g.dart files without fear of losing changes to .dart files.

    enhancement High Priority refactor Code-Generation Needs discussion 
    opened by SuperGNUS 4
  • Split up _generatescreens method within interpret.dart based on responsibilites

    Split up _generatescreens method within interpret.dart based on responsibilites

    Request Type: Code Refactor

    Description

    The method for interpret dart on Parabeac Core is currently very long and functions like a pipe filter, this proposal is to break that into separate methods based on responsibility.

    Current Solution

    The current structure is just a very long and difficult to read method that handles the entire process of generating screens within the Interpret.dart file

    Proposed Solution

    Instead of having all of the logic happen within this function in the interpret.dart file, have this function call other functions that handle the specific task being formed at that point. This would clean up the code and make it a lot easier to both read and maintain going forward.

    Files Affected:

    • interpret.dart

    Additional Notes:

    good first issue Proposal refactor HacktoberFest 
    opened by Ihuds577 4
  • Using Dart's ArgParser to parse arguments

    Using Dart's ArgParser to parse arguments

    Currently in both parabeac.dart and main.dart the arguments are being parsed using a for-loop and a switch statement. This can lead to many errors when parsing arguments and can be quite inefficient.

    In order to improve this we can use the args package which provides elegant argument-parsing functionality, reduces the potential for errors, and will make the code more concise.

    enhancement good first issue Feature Development HacktoberFest 
    opened by ivan-015 4
  • A

    A "moderate severity vulnerability" and a few warnings during conversion

    Describe the bug

    I tested parabeac on a simple mobile screen in Sketch. I'm really impressed with the conversion and very excited by your project. I'll continue with more complex screens. But, as it is, I think this is amazingly clean, even with the warnings issued by the "dart parabeac.dart" command output, below:

    To Reproduce

    Steps to reproduce the behavior:

    1. Run the dart parabeac.dart -p command. It started with these errors.

    $ dart parabeac.dart -p /Users/brianfogel/Sites/TestBed.sketch -n playground audited 537 packages in 1.876se and its dependencies

    43 packages are looking for funding run npm fund for details

    found 1 moderate severity vulnerability run npm audit fix to fix them, or npm audit for details [====] Installed Sketch Asset Converter dependencies npm WARN [email protected] No repository field. npm WARN [email protected] No license field.

    /Users/brianfogel/Sites/parabeac-core/pb-scripts/install.sh: line 38: pub: command not found /Users/brianfogel/Sites/parabeac-core/pb-scripts/install.sh: line 42: 80977 Killed: 9 spin $* (wd: ~/Sites/parabeac-core)

    The important part of the above output was moderate severity vulnerability. The suggested fix did not work:

    $ npm audit fix npm ERR! code EAUDITNOPJSON npm ERR! audit No package.json found: Cannot audit a project without a package.json

    npm ERR! A complete log of this run can be found in: npm ERR! /Users/brianfogel/.npm/_logs/2021-03-14T00_39_17_989Z-debug.log

    Further into the command output was this warning:

    warning: failed to load external entity "tempout.xml"

    What is the "tempout.xml" file? Is it important or useful and what happens if it can't be loaded?

    The command output finished with this warning:

    lib/main.dart: Warning: Interpreting this as package URI, 'package:parabeac_core/main.dart'. Unhandled exception: ProcessException: No such file or directory Command: dartfmt -w /Users/brianfogel/Sites/playground/bin /Users/brianfogel/Sites/playground/lib /Users/brianfogel/Sites/playground/test #0 _ProcessImpl._runAndWait (dart:io-patch/process_patch.dart:476:7) #1 _runNonInteractiveProcessSync (dart:io-patch/process_patch.dart:619:18) #2 Process.runSync (dart:io-patch/process_patch.dart:66:12) #3 FlutterProjectBuilder.convertToFlutterProject (package:parabeac_core/generation/flutter_project_builder/flutter_project_builder.dart:153:15) #4 Controller.convertFile (package:parabeac_core/controllers/controller.dart:55:5) #5 SketchController.convertFile (package:parabeac_core/controllers/sketch_controller.dart:37:5)

    The project's lib folder is /Users/brianfogel/Sites/playground/lib. What does this warning mean? Did this cut off the conversion process?

    I opened the converted files in my IDE

    Impact of the problem

    I'm not sure what the impact of these warnings and error were but I'm providing them in case they're useful.

    Environment:

    • MacOS Big Sur 11.2
    • fish shell 3.20
    • nvm 0.37.2
    • node v14.16.0
    • IntelliJ Ultimate 2020.3
    • Dart 2.12.0
    • Flutter 2.0.1

    Additional comments/context:

    It would be nice if the documentation talked more about the proper way to locate the 'parabeac-core' folder in relation to an existing flutter project folder. What if I already have identically named folders and dart files? Would parabeac overwrite them?

    I located the 'parabeac-core' repo folder one folder above an existing project directory ('playground') to see what it would do. It modified my project's main.dart file by replacing the body of void main() {}.

    void main() {
      runApp(
        MultiProvider(
          providers: [],
          child: MyApp(),
        ),
      );
    }
    

    Previously it was:

    void main() {
      runApp(HomePage());
    }
    

    That's not so bad in this case but it could have been much worse and the documentation should talk about this. It also created a new folder and file hierarchy under lib.

    screens └page_1 └sign_in.dart

    In hindsight it did that because 'Sign in' is under 'Page 1' in my Sketch file, but what if that folder and file hierarchy had already existed? Would parabeac have overwritten them?

    I had to make very minor edits to the converted flutter and dart code. I'm running with null safety and luckily the auto_size_text package has a pre-release null safe version and provider is null safe. There were some spelling oddities that in hindsight I can see were due to how I named layers and elements in Sketch. I did not use <> annotation in the layer or element names to help with the conversion. For now I just wanted to see what would happen to a file conversion without me making any changes to it. Thank you for this project.

    bug 
    opened by fogelfish 3
  • Does Figma needs to be created by following any specific guidelines ?

    Does Figma needs to be created by following any specific guidelines ?

    Hello,

    I tried to download the source code of parabeac locally on MAC. Tried to generate a project using commands. It did create successfully with the Hello world Figma file that you have as an example.

    But If I use a different Figma file which is a bigger project by itself in Figma. I am not able to create the project successfully,

    The command used by. me is $ pub get $ dart parabeac.dart -f -k -o

    This is failing to generate saying Error During Communication: Error occured while Communication with Server with StatusCode : 429

    So, does Figma file creation should be in any format ?

    Please advice.

    Thanks in advance, Champa

    opened by champa-iyengar 1
  • Empty SVGs are not being downloaded

    Empty SVGs are not being downloaded

    Describe the bug

    Figma has some interesting capabilities, one of them is being able to generate empty vectors. Parabeac-core takes all vectors & download them as svgs, but if the vector happen to be empty, Parabeac-core cannot download it. But the issue comes when it tries to still use & export that svg on the files, the pubspec.yaml for example, complains about missing assets. I believe, core should detect the empty svg, that was not exported & then let the rest of core know, to not use it, since it will not be exported.

    To Reproduce

    Steps to reproduce the behavior:

    1. Convert Figma file https://www.figma.com/file/WyKbF0awxlRmAIJ9JP4YvR/FYTR-Parabeac-Build?node-id=843%3A1829
    2. On the output, look for the svg asset, states.svg
    3. It should not be there, but if we look on the pubspec.yaml we will see, that it is part of the package

    Impact of the problem

    In case of multiple empty vectors, it will generate a lot of not necessary lines.

    Environment:

    • OS: macOS
    bug 
    opened by SushiRoll53 0
  • Missing parent Frame constraints

    Missing parent Frame constraints

    Describe the bug

    A custom frame is created with its respective constraints, in this case the only child of the custom frame is an svg. Svg is created correctly but the parent constraints of the container are incorrect. As we can see on the attached screen shot. As we can see on the second screenshot, the frame with & height is set to 24, while on the output container it gets 12 & 7.41 for height & width. Which are the children's constraints.

    To Reproduce

    Steps to reproduce the behavior:

    1. Using core, transform the Figma file https://www.figma.com/file/EleFMmkgmKJoS0IwwBZ3jc/FYTR-Parabeac-Build-(Copy)?node-id=849%3A3960
    2. Once it is done, look for the component meal_cart_card.g.dart
    3. Scroll down to line 142 & look for DecrementMealQuantityCustom
    4. See error

    Impact of the problem

    It is an inaccurate output

    Environment:

    • OS: macOS

    Screenshots

    Screen Shot 2022-10-24 at 11 39 03 AM

    Screen Shot 2022-10-24 at 11 39 35 AM bug 
    opened by SushiRoll53 0
  • Parabeac Themes should generate an Asset Sheet

    Parabeac Themes should generate an Asset Sheet

    When leveraging assets that are being generated from Parabeac, you're often leveraging an SVG Object or Image which requires a String as the call. For example: "assets/home_icon".

    I believe this could be reduced to something like ProjectAssets.home_icon which would return the SVG already prepared as a widget. This would reduce the amount of code that the developer would have to write when leveraging the assets.

    Code-Generation 
    opened by siliconivan 0
  • Improper name formatting of Global Styles

    Improper name formatting of Global Styles

    Describe the bug

    Global Styles in Figma have wide flexibility in the naming. As such, Figma allows me to name my global styles something like 012 My Style. This is a problem because parabeac_core will export this style name as a variable named 012myStyle.

    The goal of this issue is to correctly format color names in such a way that we remove any invalid special characters, and move any initial numbers in the variable name to the end of the variable.

    Therefore, 012my$Style shall convert to myStyle012. If we detect a global style with a name such as 500we shall change it to <styleType>500. For example, if we have a Global Color named 500, the name will change to color500.

    To Reproduce the bug

    Steps to reproduce the behavior:

    1. Go to figma.com and create a new Design file.
    2. Create a global color, named something like 012myColor.
    3. Using parabeac_core, convert the file.
    4. You should see that in the themes folder, there is an error because the global color printed out its literal name.

    Impact of the problem

    The problem is that the bug causes compiler errors that will not allow users to run their project.

    Environment:

    • OS: macOS
    bug HacktoberFest 
    opened by ivan-015 2
Releases(v3.3.0)
  • v3.3.0(Aug 15, 2022)

    What's Changed

    • Generation of ColorSchemes
    • Integration of ColorSchemes into ThemeData
    • Improve CLI arguments
    • Add capabilities to configurations.json for CLI arguments
    • Add levels of integration
    • Improvements and Bugfixes

    Full Changelog: https://github.com/Parabeac/parabeac_core/compare/v3.1.0...v3.3.0

    Source code(tar.gz)
    Source code(zip)
  • v3.1.0(Jul 5, 2022)

    • Generation of global Colors
      • If detected in a Figma file, parabeac_core will export a file containing all global colors as constants.
    • Generation of global TextStyles
      • If detected in a Figma file, parabeac_core will export a file containing all global TextStyles as constants.
      • Includes fontSize, fontWeight, letterSpacing, fontFamily, color, and decoration
    • Add Golden tests
    • Bugfixes
      • Alignment improvements
      • Constraints improvements
    Source code(tar.gz)
    Source code(zip)
  • v3.0.0(May 8, 2022)

    What's Changed

    • Add support for domain-layered architecture
      • This organizes the Flutter folder structure by the type or domain. We use the following folders to organize the project:
        • widgets - Corresponds to the Components of the design file
        • views - Corresponds to the top-level Frames (screens) of the design file
        • assets - Will contain the project's images
      • Each directory will be subdivided according to the number of pages inside the Figma file.
      • This is a breaking change, as previous projects will generate with a new folder structure.

    Full Changelog: https://github.com/Parabeac/parabeac_core/compare/v2.8.0...v3.0.0

    Source code(tar.gz)
    Source code(zip)
  • v2.8.0(Apr 11, 2022)

    What's Changed

    • Fixed BoxConstraints typing for widgets.
    • Add default widget to custom components, enabling being called independently
    • Add golden testing for AutoLayout

    Full Changelog: https://github.com/Parabeac/parabeac_core/compare/v2.7.0...v2.8.0

    Source code(tar.gz)
    Source code(zip)
  • v2.7.0(Apr 6, 2022)

    What's Changed

    • Add runtime transactions in Sentry
    • Added golden file testing for styling
    • Fix styling bugs for components

    Full Changelog: https://github.com/Parabeac/parabeac_core/compare/v2.6.1...v2.7.0

    Source code(tar.gz)
    Source code(zip)
  • v2.6.1(Mar 21, 2022)

    What's Changed

    • Add Dashbook Support.
    • Fix PBFlutterWriter Returning Too Early.

    Full Changelog: https://github.com/Parabeac/parabeac_core/compare/v2.5.0...v2.6.1

    Source code(tar.gz)
    Source code(zip)
  • v2.5.0(Mar 13, 2022)

    What's Changed

    • Better support for Styling for Rectangles, Frames & Text
      • Fills should be better interpreted
        • SOLID fills get merged into one color
        • GRADIENT gets interpreted to its Flutter equal or made image if the gradient is more complex
        • IMAGE gets interpreted as image
      • Effects such as Shadows get added just for Rectangles now
      • Borders are better interpreted & aligned
    • Images that are only vector related are interpreted as SVG for better representation on Flutter code
    • Fixed issue on components
    • Fixed small issues & inconsistencies on variables names, references & duplications

    Full Changelog: https://github.com/Parabeac/parabeac_core/compare/v2.4.0...v2.5.0

    Source code(tar.gz)
    Source code(zip)
  • v2.4.0(Feb 23, 2022)

    What's Changed

    • Component Isolation Support
    • Widgetbook Integration
    • Add option to provide parabeac with OAuth token to convert Figma Files

    Full Changelog: https://github.com/Parabeac/parabeac_core/compare/v2.3.0...v2.4.0

    Source code(tar.gz)
    Source code(zip)
  • v2.3.0(Jan 18, 2022)

  • v2.2.0(Dec 28, 2021)

  • v2.1.0(Nov 26, 2021)

  • v2.0.0(Sep 24, 2021)

    • Add PBDL as a submodule
    • Add generation of .g (generated) files
    • Add custom tags to allow developers to inject customized logic into elements
    • Add support for constraints and resizing
    Source code(tar.gz)
    Source code(zip)
  • v1.4.6(May 10, 2021)

  • v1.4.5(Apr 19, 2021)

  • v1.4.4(Apr 9, 2021)

  • v1.4.3(Mar 26, 2021)

  • v1.4.2(Mar 24, 2021)

  • v1.4.1(Mar 18, 2021)

  • v1.4.0(Mar 12, 2021)

  • v1.3.5(Mar 3, 2021)

  • v1.3.4(Feb 23, 2021)

    • Support for AutoSizeText.
    • Adding numbering notation if duplicate vars are detected.
    • Fixed issues with state management middleware.
    • Abstracted similarities between Provider and Riverpod.
    Source code(tar.gz)
    Source code(zip)
  • v1.3.3(Feb 17, 2021)

    • Fixed provider registration.
    • Fixed import generation.
    • Figma now removed shadows from images.
    • Fixed state management bugs.
    • Fixed PBDL bugs.
    Source code(tar.gz)
    Source code(zip)
  • v1.3.2(Feb 9, 2021)

    • Added riverpod support.
    • Provider fixes (MultiProvider widget is now being generated in main.dart).
    • Added ability for any state management system to rewrite the main() function.
    Source code(tar.gz)
    Source code(zip)
  • v1.3.1(Feb 2, 2021)

  • v1.3.0(Jan 19, 2021)

  • v1.2.1(Nov 19, 2020)

  • v1.2.0(Oct 17, 2020)

  • v1.1.2(Oct 5, 2020)

    • Format code when the project is created.
    • font-family to attributes.
    • border thickness for rectangles.
    • different configurations for layout service.
    • added font-kerning parameter 'letter-spacing' to text style
    • bug fixes.
    Source code(tar.gz)
    Source code(zip)
  • v1.1.1(Sep 21, 2020)

  • v1.1.0(Sep 15, 2020)

    • Metrics
    • Ability to process Sketch Prototyping to Navigation logic
    • Parabeac Design Language (PBDL); allows faster onboarding of new Design Files
    • Bug Fixes
    Source code(tar.gz)
    Source code(zip)
Owner
Parabeac
Parabeac helps Flutter teams with designer/developer handoff by converting their design files to Flutter code.
Parabeac
Love-Calculator-Flutter - A Love Calculator Flutter app created for learning basic stuffs in Dart

Love Calculator The same old Love Calculator ,but in flutter NB A simple flutter

Adithya Krishnan 3 Nov 14, 2022
Easy to use text widget for Flutter apps, which converts inlined urls into working, clickable links

LinkText Easy to use text widget for Flutter apps, which converts inlined URLs into clickable links. Allows custom styling. Usage LinkText widget does

Aleksander Woźniak 20 Nov 4, 2022
At its core, Mah-Event lets end-users initiate and find events corresponding to their interests and location

Mah-Event Application At its core, Mah-Event lets end-users initiate and find events corresponding to their interests and location. It allows people t

Palm Jumnongrat 4 Oct 23, 2022
A Flutter mobile application built completely using DhiWise and Supabase without coding single line of code. With 100% system generated code

Flutter Expension Getting Started with Flutter ?? Generated with ❤️ from Dhiwise A Flutter mobile application built completely using DhiWise and Supab

DhiWise 11 Oct 23, 2022
Canton Design System elements and resources for Flutter.

Canton UI Canton UI elements and resources for Flutter. Examples in Apps Notes App News App Elisha Description This includes things such as themes (co

Carlton Aikins 10 Dec 17, 2022
Design system flutter - A framework contains SBB (Swiss Federal Railways) UI elements for Flutter Apps

Design System Mobile for Flutter Design System Mobile in Flutter (yes, it could

Swiss Federal Railways (SBB) 14 Dec 22, 2022
Alarm app where user setting with touch gesture by moving the hand clock

Alarm App Using Flutter Flutter alarm app where user setting with touch gesture by moving the hand clock How to run Clone this repository Run flutter

null 3 Sep 3, 2022
This is a Flutter plugin that takes a JSON string and converts it onto a customizable Flutter Widget.

Colored JSON Convert JSON string into customizable widget. Getting Started ColoredJson is a stateless widget that produces a structured view of JSON s

null 4 May 20, 2022
This is a dart package that converts words to numbers. It can be used in Flutter and normal Dart programs

Wordstonumbers.dart Wordstonumbers.dart is a simple dart package that converts a string of simple worded numbers into digits (e.g one hundred -> 100).

Michael Essiet 3 Oct 17, 2022
A Dart package that converts big numbers to what's pleasant to see

Convert big numbers to what's pleasant to see (an adorable, little girl, perhaps?)

Nobuharu Shimazu 3 Apr 16, 2022
Source code for login demo in Coding with Flutter series

Flutter & Firebase Authentication demo Source code based on my Flutter & Firebase Authentication video series: Part 1 Part 2 Part 3 Part 4 Part 5 Part

Andrea Bizzotto 162 Dec 29, 2022
A flutter plugin about qr code or bar code scan , it can scan from file、url、memory and camera qr code or bar code .Welcome to feedback your issue.

r_scan A flutter plugin about qr code or bar code scan , it can scan from file、url、memory and camera qr code or bar code .Welcome to feedback your iss

PengHui Li 112 Nov 11, 2022
Download files from Firebase Storage with Flutter. List all images, videos, or other files from Firebase and download them.

Flutter Tutorial - Download Files From Firebase Storage Download files from Firebase Storage with Flutter. List all images, videos, or other files fro

Johannes Milke 28 Dec 4, 2022
Upload Files To Firebase Storage with Flutter. Pick images, videos, or other files from your device and upload them to Firebase.

Flutter Tutorial - Upload Files To Firebase Storage Upload Files To Firebase Storage with Flutter. Pick images, videos, or other files from your devic

Johannes Milke 30 Dec 28, 2022
Shader manages the compilation of your GLSL shaders into SPIR-V byte code and Dart code

shader Shader manages the compilation of your GLSL shaders into SPIR-V byte code and Dart code. Quickstart # Install cli dart pub global activate shad

Felix Blaschke 25 Dec 1, 2022
Combine a set of dart files into one

dart-merger Combine a set of dart files into one. This is useful when you want to organize a group of files automatically generated by generator. Inst

Kenta Murai 2 Mar 17, 2022
A periodic table app with 3D view of the elements built using flutter.

A flutter app which takes you on a 3d visualisation of the 118 elements of the periodic table. promo.mp4 Tech Stack Deployed using How it all began It

Shanwill Pinto 48 Nov 16, 2022
A modern app made with Flutter to track the chemical elements.

Elements A modern app to track the chemical elements. Including all 118 elements, with their weight, radiation, consistency, type, block, and electron

Kristóf Kékesi 13 Nov 28, 2021