Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit 362de13

Browse files
committed
dartfmt updates
1 parent 0004e3d commit 362de13

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

public/docs/_examples/template-syntax/dart/lib/app_component.dart

+11-9
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,7 @@ class AppComponent implements OnInit, AfterViewInit {
108108

109109
bool onSave([UIEvent event = null]) {
110110
HtmlElement el = event?.target;
111-
var evtMsg =
112-
event != null ? ' Event target is ${el.innerHtml}.' : '';
111+
var evtMsg = event != null ? ' Event target is ${el.innerHtml}.' : '';
113112
alerter('Saved. $evtMsg');
114113
return false;
115114
}
@@ -128,7 +127,7 @@ class AppComponent implements OnInit, AfterViewInit {
128127
String getStyles(Element el) {
129128
final style = el.style;
130129
final Map styles = <String, String>{};
131-
for(var i = 0; i < style.length; i++) {
130+
for (var i = 0; i < style.length; i++) {
132131
styles[style.item(i)] = style.getPropertyValue(style.item(i));
133132
}
134133
return JSON.encode(styles);
@@ -144,8 +143,8 @@ class AppComponent implements OnInit, AfterViewInit {
144143
};
145144
// #docregion setClasses
146145
// compensate for DevMode (sigh)
147-
if (JSON.encode(_previousClasses) ==
148-
JSON.encode(classes)) return _previousClasses;
146+
if (JSON.encode(_previousClasses) == JSON.encode(classes))
147+
return _previousClasses;
149148
_previousClasses = classes;
150149
// #enddocregion setClasses
151150
return classes;
@@ -167,7 +166,7 @@ class AppComponent implements OnInit, AfterViewInit {
167166
bool isBold = false;
168167
String fontSize = 'large';
169168

170-
Map<String,String> setStyle() {
169+
Map<String, String> setStyle() {
171170
return {
172171
'font-style': isItalic ? 'italic' : 'normal',
173172
'font-weight': isBold ? 'bold' : 'normal',
@@ -205,13 +204,16 @@ class AppComponent implements OnInit, AfterViewInit {
205204
int heroesNoTrackByChangeCount = 0;
206205
int heroesWithTrackByChangeCount = 0;
207206

208-
@ViewChildren('noTrackBy') QueryList<ElementRef> childrenNoTrackBy;
209-
@ViewChildren('withTrackBy') QueryList<ElementRef> childrenWithTrackBy;
207+
@ViewChildren('noTrackBy')
208+
QueryList<ElementRef> childrenNoTrackBy;
209+
@ViewChildren('withTrackBy')
210+
QueryList<ElementRef> childrenWithTrackBy;
210211

211212
void _detectNgForTrackByEffects() {
212213
/// Converts [viewChildren] to a list of [Element].
213214
List<Element> _extractChildren(QueryList<ElementRef> viewChildren) =>
214-
viewChildren.toList()[0].nativeElement.children.toList() as List<Element>;
215+
viewChildren.toList()[0].nativeElement.children.toList()
216+
as List<Element>;
215217

216218
{
217219
// Updates 'without TrackBy' statistics.

0 commit comments

Comments
 (0)