You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**This SDK is compatible with Appwrite server version 0.7.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-flutter/releases).**
9
+
**This SDK is compatible with Appwrite server version 0.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-flutter/releases).**
10
10
11
11
Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way.
12
12
Use the Flutter SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
@@ -22,7 +22,7 @@ Add this to your package's `pubspec.yaml` file:
22
22
23
23
```yml
24
24
dependencies:
25
-
appwrite: ^0.5.0-dev.1
25
+
appwrite: ^0.6.0
26
26
```
27
27
28
28
You can install packages from the command line:
@@ -92,7 +92,7 @@ Client client = Client();
92
92
client
93
93
.setEndpoint('https://localhost/v1') // Your Appwrite Endpoint
94
94
.setProject('5e8cf4f46b5e8') // Your project ID
95
-
.setSelfSigned() // Remove in production
95
+
.setSelfSigned() // Use only on dev mode with a self-signed SSL cert
96
96
;
97
97
```
98
98
@@ -125,7 +125,7 @@ Client client = Client();
125
125
client
126
126
.setEndpoint('https://localhost/v1') // Your Appwrite Endpoint
127
127
.setProject('5e8cf4f46b5e8') // Your project ID
128
-
.setSelfSigned() // Remove in production
128
+
.setSelfSigned() // Use only on dev mode with a self-signed SSL cert
129
129
;
130
130
131
131
@@ -140,6 +140,21 @@ Response user = await account
140
140
);
141
141
```
142
142
143
+
### Error Handling
144
+
The Appwrite Flutter SDK raises `AppwriteException` object with `message`, `code` and `response` properties. You can handle any errors by catching `AppwriteException` and present the `message` to the user or handle it yourself based on the provided error information. Below is an example.
145
+
146
+
```dart
147
+
Users users = Users(client);
148
+
149
+
try {
150
+
final response = await users.create(email: ‘[email protected]’,password: ‘password’, name: ‘name’);
151
+
print(response.data);
152
+
} on AppwriteException catch(e) {
153
+
//show message to user or do other operation based on error as required
154
+
print(e.message);
155
+
}
156
+
```
157
+
143
158
### Learn more
144
159
You can use followng resources to learn more and get help
145
160
- 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-flutter)
0 commit comments