getJsUI method
Generates the HTML for including JS assets in the frontend.
Returns a string containing the <script>
tags for each JS asset.
Implementation
String getJsUI() {
List<String> result = [];
for (var j in js) {
String attrs = '';
j.attrs.forEach((key, value) {
attrs = '$attrs $key="$value"';
});
result.add('<script $attrs src="${j.url}"></script>');
}
return result.join('\n');
}