Flutter like API vs Butterfly API
Closed this issue · 0 comments
jonahwilliams commented
There is a big stylistic/visual clash between flutter style widgets (new Foo) versus the current VirtualElementBuilder widgets.
Part of the todo demo with a Column widget:
section(attrs: const {'id': 'main'})([
input('checkbox',
attrs: const {'id': 'toggle-all'},
eventListeners: {EventType.click: toggleAll})(),
label(attrs: const {'for': 'toggle-all'})(
[text('Mark all as complete')]),
new Column(children: listItems, id: 'todo-list')
]),
I think we should only have a single style of widget, however the current Builder style doesn't really work well with layout/structural widgets because of all the noise introduced by the extra ()
s:
column(id: 'todo-list)([])
Especially since many of these identifiers could clash with common local variable names (row, column, container).