style(dart): Format with dartfmt v0.2.0

Format all pure Dart code with package:dart_style v0.2.0

Command:
```
find -type f -name "*.dart" | xargs dartformat -w
```
This commit is contained in:
Tim Blasi
2015-08-04 12:05:30 -07:00
parent 450d3630cc
commit f11f4e0b45
145 changed files with 1627 additions and 1013 deletions

View File

@ -5,7 +5,9 @@ import 'dart:html';
import 'package:angular/angular.dart';
import 'package:angular2/src/test_lib/benchmark_util.dart';
@Component(selector: 'scroll-app', template: '''
@Component(
selector: 'scroll-app',
template: '''
<div>
<div style="display: flex">
<scroll-area scroll-top="scrollTop"></scroll-area>

View File

@ -3,25 +3,34 @@ library cells;
import 'package:angular/angular.dart';
import 'common.dart';
@Component(selector: 'company-name', template: '''
@Component(
selector: 'company-name',
template: '''
<div style="width: {{width}}">{{company.name}}</div>
''', map: const {'company': '=>company', 'cell-width': '=>width',})
''',
map: const {'company': '=>company', 'cell-width': '=>width',})
class CompanyNameComponent {
String width;
Company company;
}
@Component(selector: 'opportunity-name', template: '''
@Component(
selector: 'opportunity-name',
template: '''
<div style="width: {{width}}">{{opportunity.name}}</div>
''', map: const {'opportunity': '=>opportunity', 'cell-width': '=>width',})
''',
map: const {'opportunity': '=>opportunity', 'cell-width': '=>width',})
class OpportunityNameComponent {
String width;
Opportunity opportunity;
}
@Component(selector: 'offering-name', template: '''
@Component(
selector: 'offering-name',
template: '''
<div style="width: {{width}}">{{offering.name}}</div>
''', map: const {'offering': '=>offering', 'cell-width': '=>width',})
''',
map: const {'offering': '=>offering', 'cell-width': '=>width',})
class OfferingNameComponent {
String width;
Offering offering;
@ -38,7 +47,9 @@ class Stage {
: '';
}
@Component(selector: 'stage-buttons', template: '''
@Component(
selector: 'stage-buttons',
template: '''
<div style="width: {{width}}">
<button ng-repeat="stage in stages"
ng-disabled="stage.isDisabled"
@ -47,7 +58,8 @@ class Stage {
{{stage.name}}
</button>
</div>
''', map: const {'offering': '=>offering', 'cell-width': '=>width',})
''',
map: const {'offering': '=>offering', 'cell-width': '=>width',})
class StageButtonsComponent {
Offering _offering;
List<Stage> stages;
@ -83,13 +95,16 @@ class StageButtonsComponent {
}
}
@Component(selector: 'account-cell', template: '''
@Component(
selector: 'account-cell',
template: '''
<div style="width: {{width}}">
<a href="/account/{{account.accountId}}">
{{account.accountId}}
</a>
</div>
''', map: const {'account': '=>account', 'cell-width': '=>width',})
''',
map: const {'account': '=>account', 'cell-width': '=>width',})
class AccountCellComponent {
Account account;
String width;

View File

@ -40,7 +40,8 @@ const AAT_STATUS_LIST = const ['Active', 'Passive', 'Abandoned'];
// Imitate Streamy entities.
class RawEntity extends Object with MapMixin<String, dynamic>
class RawEntity extends Object
with MapMixin<String, dynamic>
implements ObservableMap<String, dynamic> {
ObservableMap _data = new ObservableMap();
@ -113,10 +114,12 @@ class RawEntity extends Object with MapMixin<String, dynamic>
void notifyChange(ChangeRecord record) {
_data.notifyChange(record);
}
@override
void observed() {
_data.observed();
}
@override
void unobserved() {
_data.observed();

View File

@ -62,12 +62,8 @@ DateTime randomDate(int seed, {DateTime minDate}) {
}
String randomString(int seed) {
return new String.fromCharCodes(new List.generate(const [
5,
7,
9,
11,
13
][seed % 5], (i) =>
'a'.codeUnitAt(0) + const [0, 1, 2, 3, 4, 5, 6, 7, 8][seed % 9] + i));
return new String.fromCharCodes(new List.generate(
const [5, 7, 9, 11, 13][seed % 5],
(i) =>
'a'.codeUnitAt(0) + const [0, 1, 2, 3, 4, 5, 6, 7, 8][seed % 9] + i));
}

View File

@ -24,6 +24,7 @@ class ScrollItemComponent implements ShadowRootAware {
'justify-content': 'space-between',
});
}
get companyNameWidth => '${COMPANY_NAME_WIDTH}px';
get opportunityNameWidth => '${OPPORTUNITY_NAME_WIDTH}px';
get offeringNameWidth => '${OFFERING_NAME_WIDTH}px';