Skip to content

Commit a2314c8

Browse files
authored
Merge pull request #7 from appwrite/fix-flutter-endpoint
Fix flutter endpoint
2 parents 8aa2aec + f2caf6f commit a2314c8

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Alternatively, open the repository URL in `Android Studio` to clone it directly.
2727
Open `lib/config/environment.dart` and update the values with your Appwrite project credentials:
2828
```dart
2929
class Environment {
30-
static const String appwriteEndpoint = '[appwriteEndpoint]';
30+
static const String appwritePublicEndpoint = '[appwritePublicEndpoint]';
3131
static const String appwriteProjectId = '[appwriteProjectId]';
3232
static const String appwriteProjectName = '[appwriteProjectName]';
3333
}

lib/config/environment.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class Environment {
2-
static const String appwriteEndpoint = '[appwriteEndpoint]';
2+
static const String appwritePublicEndpoint = '[appwritePublicEndpoint]';
33
static const String appwriteProjectId = '[appwriteProjectId]';
44
static const String appwriteProjectName = '[appwriteProjectName]';
55
}

lib/data/repository/appwrite_repository.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class AppwriteRepository {
1111
static const String pingPath = "/ping";
1212
static const String appwriteProjectId = Environment.appwriteProjectId;
1313
static const String appwriteProjectName = Environment.appwriteProjectName;
14-
static const String appwritePublicEndpoint = Environment.appwriteEndpoint;
14+
static const String appwritePublicEndpoint = Environment.appwritePublicEndpoint;
1515

1616
final Client _client = Client()
1717
.setProject(appwriteProjectId)

prepare-env.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ set -e
33

44
# Script used during deployment on Appwrite Sites
55

6-
# Replace [appwriteEndpoint] with APPWRITE_ENDPOINT in environment file
7-
sed -i "s|\[appwriteEndpoint\]|$APPWRITE_ENDPOINT|g" lib/config/environment.dart
6+
# Replace [appwritePublicEndpoint] with APPWRITE_PUBLIC_ENDPOINT in environment file
7+
sed -i "s|\[appwritePublicEndpoint\]|$APPWRITE_PUBLIC_ENDPOINT|g" lib/config/environment.dart
88

99
# Replace [appwriteProjectId] with APPWRITE_PROJECT_ID in environment file
1010
sed -i "s|\[appwriteProjectId\]|$APPWRITE_PROJECT_ID|g" lib/config/environment.dart

0 commit comments

Comments
 (0)