Created with <3 with dartpad.dev.
Created
October 18, 2023 16:50
-
-
Save johnpryan/c2e13b349d69e4a6f8e1223d2082fcdf to your computer and use it in GitHub Desktop.
lively-performance-3668
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'}); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment