Skip to content

Commit 1ed38ab

Browse files
committed
dartfmt
1 parent fabfc56 commit 1ed38ab

File tree

9 files changed

+22
-15
lines changed

9 files changed

+22
-15
lines changed

example/octocat.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ void loadCat() {
2121
var index = random.nextInt(cats.length);
2222
var cat = cats[index];
2323
print("Selected Octocat at ${index} (${cat.name})");
24-
$octocat.appendHtml("""
24+
$octocat.appendHtml(
25+
"""
2526
<h2>${cat.name}</h2>
2627
<a class="center" href="${cat.url}"><img src="${cat.image}"></img></a>
27-
""", treeSanitizer: NodeTreeSanitizer.trusted);
28+
""",
29+
treeSanitizer: NodeTreeSanitizer.trusted);
2830
});
2931
}

example/readme.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ void loadReadme() {
1717
github.repositories
1818
.getReadme(new RepositorySlug("DirectMyFile", "github.dart"))
1919
.then((file) => github.misc.renderMarkdown(file.content))
20-
.then((html) => $readme.appendHtml(html, validator: NodeTreeSanitizer.trusted));
20+
.then((html) =>
21+
$readme.appendHtml(html, validator: NodeTreeSanitizer.trusted));
2122
}

example/releases.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,18 @@ void loadReleases() {
1919
.toList()
2020
.then((releases) {
2121
for (var release in releases) {
22-
$releases.appendHtml("""
22+
$releases.appendHtml(
23+
"""
2324
<div class="repo box" id="release-${release.id}">
2425
<h1>${release.name}</h1>
2526
</div>
26-
""", treeSanitizer: NodeTreeSanitizer.trusted);
27+
""",
28+
treeSanitizer: NodeTreeSanitizer.trusted);
2729
var rel = $releases.querySelector("#release-${release.id}");
2830
void append(String key, value) {
2931
if (value == null) return;
30-
rel.appendHtml("<br/><b>${key}</b>: ${value}", treeSanitizer: NodeTreeSanitizer.trusted);
32+
rel.appendHtml("<br/><b>${key}</b>: ${value}",
33+
treeSanitizer: NodeTreeSanitizer.trusted);
3134
}
3235
append("Tag", '<a href=${release.htmlUrl}>${release.tagName}</a>');
3336
append("Download",

example/repos.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ void updateRepos(List<Repository> repos,
5454
document.querySelector("#repos").children.clear();
5555
repos.sort(compare);
5656
for (var repo in repos) {
57-
$repos.appendHtml("""
57+
$repos.appendHtml(
58+
"""
5859
<div class="repo" id="repo_${repo.name}">
5960
<div class="line"></div>
6061
<h2><a href="${repo.htmlUrl}">${repo.name}</a></h2>
@@ -72,7 +73,8 @@ void updateRepos(List<Repository> repos,
7273
<b>Size</b>: ${repo.size} bytes
7374
<p></p>
7475
</div>
75-
""", treeSanitizer: NodeTreeSanitizer.trusted);
76+
""",
77+
treeSanitizer: NodeTreeSanitizer.trusted);
7678
}
7779
}
7880

example/users.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ void loadUsers() {
4545
buff.writeln("Followers: ${user.followersCount}");
4646

4747
h.append(new ParagraphElement()
48-
..appendHtml(buff.toString().replaceAll("\n", "<br/>"), treeSanitizer: NodeTreeSanitizer.trusted));
48+
..appendHtml(buff.toString().replaceAll("\n", "<br/>"),
49+
treeSanitizer: NodeTreeSanitizer.trusted));
4950

5051
m.append(h);
5152

lib/src/common/model/repos_contents.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ class GitHubFile {
3838
/// Text Content
3939
String get text {
4040
if (_text == null) {
41-
_text = new String.fromCharCodes(CryptoUtils.base64StringToBytes(content));
41+
_text =
42+
new String.fromCharCodes(CryptoUtils.base64StringToBytes(content));
4243
}
4344
return _text;
4445
}

lib/src/common/orgs_service.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,7 @@ class OrganizationsService extends Service {
284284
/// API docs: https://developer.github.com/v3/orgs/hooks/#create-a-hook
285285
Future<Hook> createHook(String org, CreateHook hook) {
286286
return _github.postJSON("/orgs/${org}/hooks",
287-
convert: (i) => Hook.fromJSON(org, i),
288-
body: hook.toJSON());
287+
convert: (i) => Hook.fromJSON(org, i), body: hook.toJSON());
289288
}
290289

291290
// TODO: Implement editHook: https://developer.github.com/v3/orgs/hooks/#edit-a-hook

test/experiment/crawler.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import "package:github/server.dart";
33
void main() {
44
initGitHub();
55

6-
var github = new GitHub(
7-
auth: new Authentication.anonymous());
6+
var github = new GitHub(auth: new Authentication.anonymous());
87

98
var crawler = new RepositoryCrawler(
109
github, new RepositorySlug.full("DirectMyFile/github.dart"));

test/experiment/readme.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ void main() {
99
.then((html) => print(html))
1010
.then((_) => github.dispose());
1111
}
12-

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy