Skip to content

Instantly share code, notes, and snippets.

@johnpryan
Created October 18, 2023 16:50

Revisions

  1. johnpryan created this gist Oct 18, 2023.
    24 changes: 24 additions & 0 deletions main.dart
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    bool isVertical = false;
    Widget build() {
    return const Column(
    direction: isVertical ? 'vertical' : 'horizontal',
    children: [
    Widget(),
    Widget(),
    ],
    );
    }

    class Widget {
    const Widget();
    }

    class Column extends Widget {
    final List<Widget> children;
    final String? direction;
    const Column({required this.children, this.direction = 'vertical'});
    }




    3 changes: 3 additions & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    # lively-performance-3668

    Created with <3 with [dartpad.dev](https://dartpad.dev).