2

I am interested in using the Builder pattern for declaratively creating UI with Rikulo. Is there a way to do so? Does the Dart syntax support a similar mechanism?

For example,

div(
  label(value:"OK")
);
chanwit
  • 3,174
  • 2
  • 23
  • 20
  • Also see: [Configure Dart editor to Build UXL Files](http://stackoverflow.com/questions/22710941/how-to-configure-dart-editor-to-build-uxl-files). – will Mar 30 '14 at 12:18

1 Answers1

3

Yes, it is possible. First, you have to define global functions for div, label and other ui objects. For example,

TextView textView([String text, String html])
=> html != null ? new TextView.html(html): new TextView(text);

It could be an excellent addon.

Tom Yeh
  • 1,987
  • 2
  • 15
  • 23