Coder Social home page Coder Social logo

thipokch / flutter_ide Goto Github PK

View Code? Open in Web Editor NEW

This project forked from norbert515/flutter_ide

0.0 0.0 0.0 48.17 MB

A visual editor for Flutter widgets

Home Page: https://widgetmaker.dev

License: MIT License

C++ 13.16% C 1.64% Objective-C 0.09% Dart 84.01% Swift 0.11% Makefile 0.55% HTML 0.02% Batchfile 0.42%

flutter_ide's Introduction

The Widget-Maker

title

Buy Me A Coffee

State of the project

The project is currently not maintained by me and the code could probably use a bit of refactoring.

This README is still work in progress.

If anybody is interested in contributing/ forking/ using it as a base for another project - feel free!

Features

  • Templates
  • Different Canvas sizes
  • Build and "Play" (interact with UI) mode
  • Multiple Canvases and instantiation
  • Code Generation

title title

Building

This is intended to be run using Flutter Desktop or Flutter web. For Desktop, simply switch to the master channel and run:

flutter run -d [windows|linux|macos]

The concept

A few words about the code architecture.

Widget-Elements

Widget-Elements play a central part in the Widget-Maker as these are actual widgets you drag around and style. The Widget-Elements can be found under lib/data/widget_elements.

Widget-Elements form a forth tree (on top of Widgets/RenderObjects and Elements) they include a lot of meta information. Widget-Elements only manage the tree, but not the actual rendering, interaction and modification of the widgets, that is up to the widget which is generated by the generateWidget() method. Those widgets have to mix in ElementWidgetStateMixin, that class contains code which handles common UX scenarios like accepting children via drag, or showing a border on selection.

Making new Widget-Elements

You certainly can make new Widget-Elements by hand, in fact Widget-Elements such as the Scaffold, Row and more are hand made.

But a lot of widgets are pretty basic, so instead of copy-pasting the same wrapper code over and over again, there is a generator which does that for you.

Take a look at (lib/Data/widget_elements/config.yaml and README.md) to get a sense of the schema.

To generated those widget simply execute the lib/data/widget_elements/scripts/build.dart file. Be sure to be inside the script folder when running that script because it relies on relative paths!

dart build.dart

Properties

The MProperty is the base class for all properties inside the Widget-Maker. Each Widget-Element has a list of properties. These properties reflect the constructor parameters of the widgets in code. Properties are responsible for providing a way of changing themselves and providing meta information.

For more information take a look at lib/data/properties/basic_properties.dart

Running the test

Not all tests seem to pass as of now.

flutter test

Website

The docs folder contains the source for www.widgetmaker.dev

Donations

Feel free to donate a pizza/ coffee :)

flutter_ide's People

Contributors

dependabot[bot] avatar mjablecnik avatar norbert515 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.