Merge pull request #7 from appwrite/fix-flutter-endpoint
Fix flutter endpoint
This commit is contained in:
commit
a2314c8920
@ -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:
|
Open `lib/config/environment.dart` and update the values with your Appwrite project credentials:
|
||||||
```dart
|
```dart
|
||||||
class Environment {
|
class Environment {
|
||||||
static const String appwriteEndpoint = '[appwriteEndpoint]';
|
static const String appwritePublicEndpoint = '[appwritePublicEndpoint]';
|
||||||
static const String appwriteProjectId = '[appwriteProjectId]';
|
static const String appwriteProjectId = '[appwriteProjectId]';
|
||||||
static const String appwriteProjectName = '[appwriteProjectName]';
|
static const String appwriteProjectName = '[appwriteProjectName]';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
class Environment {
|
class Environment {
|
||||||
static const String appwriteEndpoint = '[appwriteEndpoint]';
|
static const String appwritePublicEndpoint = '[appwritePublicEndpoint]';
|
||||||
static const String appwriteProjectId = '[appwriteProjectId]';
|
static const String appwriteProjectId = '[appwriteProjectId]';
|
||||||
static const String appwriteProjectName = '[appwriteProjectName]';
|
static const String appwriteProjectName = '[appwriteProjectName]';
|
||||||
}
|
}
|
||||||
@ -11,7 +11,7 @@ class AppwriteRepository {
|
|||||||
static const String pingPath = "/ping";
|
static const String pingPath = "/ping";
|
||||||
static const String appwriteProjectId = Environment.appwriteProjectId;
|
static const String appwriteProjectId = Environment.appwriteProjectId;
|
||||||
static const String appwriteProjectName = Environment.appwriteProjectName;
|
static const String appwriteProjectName = Environment.appwriteProjectName;
|
||||||
static const String appwritePublicEndpoint = Environment.appwriteEndpoint;
|
static const String appwritePublicEndpoint = Environment.appwritePublicEndpoint;
|
||||||
|
|
||||||
final Client _client = Client()
|
final Client _client = Client()
|
||||||
.setProject(appwriteProjectId)
|
.setProject(appwriteProjectId)
|
||||||
|
|||||||
@ -3,8 +3,8 @@ set -e
|
|||||||
|
|
||||||
# Script used during deployment on Appwrite Sites
|
# Script used during deployment on Appwrite Sites
|
||||||
|
|
||||||
# Replace [appwriteEndpoint] with APPWRITE_ENDPOINT in environment file
|
# Replace [appwritePublicEndpoint] with APPWRITE_PUBLIC_ENDPOINT in environment file
|
||||||
sed -i "s|\[appwriteEndpoint\]|$APPWRITE_ENDPOINT|g" lib/config/environment.dart
|
sed -i "s|\[appwritePublicEndpoint\]|$APPWRITE_PUBLIC_ENDPOINT|g" lib/config/environment.dart
|
||||||
|
|
||||||
# Replace [appwriteProjectId] with APPWRITE_PROJECT_ID in environment file
|
# Replace [appwriteProjectId] with APPWRITE_PROJECT_ID in environment file
|
||||||
sed -i "s|\[appwriteProjectId\]|$APPWRITE_PROJECT_ID|g" lib/config/environment.dart
|
sed -i "s|\[appwriteProjectId\]|$APPWRITE_PROJECT_ID|g" lib/config/environment.dart
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user