Skip to content

Commit aad91b4

Browse files
committed
for linux packageName is empty so using appName
1 parent 4599d82 commit aad91b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/flutter/lib/client.dart.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class Client {
9090
cookieJar = new PersistCookieJar(dir:cookieDir.path);
9191
this.http.interceptors.add(CookieManager(cookieJar));
9292
PackageInfo packageInfo = await PackageInfo.fromPlatform();
93-
addHeader('Origin', 'appwrite-$type://${packageInfo.packageName}');
93+
addHeader('Origin', 'appwrite-$type://${packageInfo.packageName ?? packageInfo.appName}');
9494
}else{
9595
// if web set httpClientAdapter as BrowserHttpClientAdapter with withCredentials true to make cookies work
9696
this.http.options.extra['withCredentials'] = true;

0 commit comments

Comments
 (0)