Skip to content

itmarck/flutter-tree

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published