File tree Expand file tree Collapse file tree 3 files changed +9
-19
lines changed Expand file tree Collapse file tree 3 files changed +9
-19
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ documentation: {{ spec.contactURL }}
88environment:
99 sdk: '>=2.6.0 <3 .0.0'
1010dependencies:
11- meta: ^1.1.8
1211 dio: ^3.0.10
12+ meta: ^1.1.8
1313
1414dev_dependencies:
1515 test:
Original file line number Diff line number Diff line change @@ -89,18 +89,8 @@ class Client {
8989 final Directory cookieDir = await _getCookiePath();
9090 cookieJar = new PersistCookieJar(dir:cookieDir.path);
9191 this.http.interceptors.add(CookieManager(cookieJar));
92- if(Platform.isAndroid || Platform.isIOS) {
93- PackageInfo packageInfo = await PackageInfo.fromPlatform();
94- addHeader('Origin', 'appwrite-' + type + '://' + packageInfo.packageName);
95- } else if(Platform.isLinux) {
96- addHeader('Origin', 'appwrite-linux://');
97- } else if(Platform.isMacOS) {
98- addHeader('Origin', 'appwrite-macos://');
99- } else if(Platform.isWindows) {
100- addHeader('Origin', 'appwrite-windows://');
101- } else if(Platform.isFuchsia) {
102- addHeader('Origin', 'appwrite-fuchsia://');
103- }
92+ PackageInfo packageInfo = await PackageInfo.fromPlatform();
93+ addHeader('Origin', 'appwrite-$type://${packageInfo.packageName ?? packageInfo.appName}');
10494 }else{
10595 // if web set httpClientAdapter as BrowserHttpClientAdapter with withCredentials true to make cookies work
10696 this.http.options.extra['withCredentials'] = true;
Original file line number Diff line number Diff line change @@ -8,16 +8,16 @@ documentation: {{ spec.contactURL }}
88environment:
99 sdk: '>=2.6.0 <3 .0.0'
1010dependencies:
11- meta: ^1.1.8
12- path_provider: ^1.6.14
13- package_info_plus: ^0.6.3
14- dio: ^3.0.10
11+ flutter:
12+ sdk: flutter
1513 cookie_jar: ^1.0.1
14+ dio: ^3.0.10
1615 dio_cookie_manager: ^1.0.0
1716 flutter_web_auth: ^0.2.4
17+ meta: ^1.1.8
18+ package_info_plus: ^0.6.3
19+ path_provider: ^1.6.14
1820 universal_html: ^1.2.3
19- flutter:
20- sdk: flutter
2121
2222dev_dependencies:
2323 flutter_test:
You can’t perform that action at this time.
0 commit comments