Better coding style
This commit is contained in:
@@ -9,9 +9,7 @@ String getPageTitle() {
|
||||
|
||||
Element makeIcon(List<String> classes, [String id]) {
|
||||
final icon = Element.tag('i')..classes.addAll(classes);
|
||||
if (id != null) {
|
||||
icon.attributes['id'] = id;
|
||||
}
|
||||
icon.attributes['id'] = id ?? '';
|
||||
return icon;
|
||||
}
|
||||
|
||||
@@ -33,7 +31,7 @@ Future<Element> makePages() async {
|
||||
..attributes['href'] = 'javascript:void(0)'
|
||||
..append(makeIcon(['fas', 'fa-flag'])))
|
||||
..classes.addAll(['nav-item', 'has-dropdown'])
|
||||
..insertAdjacentElement('beforeEnd', pages);
|
||||
..append(pages);
|
||||
}
|
||||
|
||||
Element makeShareLink(Element icon, String url) {
|
||||
|
||||
Reference in New Issue
Block a user