Skip to content

Commit 9e20693

Browse files
committed
fixed spacing errors
1 parent 6097cf2 commit 9e20693

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

templates/flutter/lib/client.dart.twig

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ class Client {
7676
Future init() async {
7777
// if web skip cookie implementation and origin header as those are automatically handled by browsers
7878
if(!kIsWeb) {
79-
final Directory cookieDir = await _getCookiePath();
80-
cookieJar = new PersistCookieJar(dir:cookieDir.path);
81-
this.http.interceptors.add(CookieManager(cookieJar));
82-
PackageInfo packageInfo = await PackageInfo.fromPlatform();
83-
addHeader('Origin', 'appwrite-$type://${packageInfo.packageName ?? packageInfo.appName}');
84-
}else{
85-
// if web set httpClientAdapter as BrowserHttpClientAdapter with withCredentials true to make cookies work
86-
this.http.options.extra['withCredentials'] = true;
79+
final Directory cookieDir = await _getCookiePath();
80+
cookieJar = new PersistCookieJar(dir:cookieDir.path);
81+
this.http.interceptors.add(CookieManager(cookieJar));
82+
PackageInfo packageInfo = await PackageInfo.fromPlatform();
83+
addHeader('Origin', 'appwrite-$type://${packageInfo.packageName ?? packageInfo.appName}');
84+
} else {
85+
// if web set httpClientAdapter as BrowserHttpClientAdapter with withCredentials true to make cookies work
86+
this.http.options.extra['withCredentials'] = true;
8787
}
8888

8989
this.http.options.baseUrl = this.endPoint;

tests/SDKTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ public function testHTTPSuccess()
202202
}
203203

204204
$whitelist = ['php', 'cli', 'node', 'ruby', 'python', 'typescript', 'deno', 'dotnet', 'dart', 'flutter'];
205+
205206
foreach ($this->languages as $language => $options) {
206207
if (!empty($whitelist) && !in_array($language, $whitelist)) {
207208
continue;
@@ -273,11 +274,11 @@ public function testHTTPSuccess()
273274
}
274275

275276
$this->assertIsArray($output);
276-
277+
277278
$removed = '';
278279
do {
279280
$removed = array_shift($output);
280-
}while($removed != 'Test Started' && sizeof($output) != 0);
281+
} while ($removed != 'Test Started' && sizeof($output) != 0);
281282

282283
$this->assertGreaterThan(10, count($output));
283284

0 commit comments

Comments
 (0)