Skip to content

Latest commit

 

History

History
93 lines (71 loc) · 1.3 KB

README.md

File metadata and controls

93 lines (71 loc) · 1.3 KB

Flutter Tree

Description

Extension for Flutter to build basic widget tree with nice syntax.

Example

Syntax

Base syntax

OneChild>MultipleChild[OneChild,MultipleChild[OneChild,OneChild],OneChild>OneChild]

Code generated

OneChild(
    child: MultipleChild(
        children: <Widget>[
            OneChild(),
            MultipleChild(
                children: <Widget>[
                    OneChild(),
                    OneChild(),
                ]
            ),
            OneChild(
                child: OneChild(),
            ),
        ]
    ),
),

Use

Create single child widget

SingleChildWidget>Child
SingleChildWidget(
    child: Child(),
),

Create multiple child widget

MultipleChildWidget[ChildOne,ChildTwo]
MultipleChildWidget(
    children: <Widget>[
        ChildOne(),
        ChildTwo(),
    ],
),

You can create nested widgets.

MultipleChild[ChildOne,ChildTwo>NestedChild>Child]
MultipleChild(
    children: <Widget>[
        ChildOne(),
        ChildTwo(
            child: NestedChild(
                child: Child(),
            ),
        ),
    ],
),

Requirements

Supported language:

  • Dart

1.0.0

Core and use with abbreviation.