Fix flutter endpoint
This commit is contained in:
parent
8aa2aec2d6
commit
f2caf6f028
@ -27,7 +27,7 @@ Alternatively, open the repository URL in `Android Studio` to clone it directly.
|
||||
Open `lib/config/environment.dart` and update the values with your Appwrite project credentials:
|
||||
```dart
|
||||
class Environment {
|
||||
static const String appwriteEndpoint = '[appwriteEndpoint]';
|
||||
static const String appwritePublicEndpoint = '[appwritePublicEndpoint]';
|
||||
static const String appwriteProjectId = '[appwriteProjectId]';
|
||||
static const String appwriteProjectName = '[appwriteProjectName]';
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
class Environment {
|
||||
static const String appwriteEndpoint = '[appwriteEndpoint]';
|
||||
static const String appwritePublicEndpoint = '[appwritePublicEndpoint]';
|
||||
static const String appwriteProjectId = '[appwriteProjectId]';
|
||||
static const String appwriteProjectName = '[appwriteProjectName]';
|
||||
}
|
||||
@ -11,7 +11,7 @@ class AppwriteRepository {
|
||||
static const String pingPath = "/ping";
|
||||
static const String appwriteProjectId = Environment.appwriteProjectId;
|
||||
static const String appwriteProjectName = Environment.appwriteProjectName;
|
||||
static const String appwritePublicEndpoint = Environment.appwriteEndpoint;
|
||||
static const String appwritePublicEndpoint = Environment.appwritePublicEndpoint;
|
||||
|
||||
final Client _client = Client()
|
||||
.setProject(appwriteProjectId)
|
||||
|
||||
@ -3,8 +3,8 @@ set -e
|
||||
|
||||
# Script used during deployment on Appwrite Sites
|
||||
|
||||
# Replace [appwriteEndpoint] with APPWRITE_ENDPOINT in environment file
|
||||
sed -i "s|\[appwriteEndpoint\]|$APPWRITE_ENDPOINT|g" lib/config/environment.dart
|
||||
# Replace [appwritePublicEndpoint] with APPWRITE_PUBLIC_ENDPOINT in environment file
|
||||
sed -i "s|\[appwritePublicEndpoint\]|$APPWRITE_PUBLIC_ENDPOINT|g" lib/config/environment.dart
|
||||
|
||||
# Replace [appwriteProjectId] with APPWRITE_PROJECT_ID in environment file
|
||||
sed -i "s|\[appwriteProjectId\]|$APPWRITE_PROJECT_ID|g" lib/config/environment.dart
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user