1
0
Fork 0
mirror of synced 2024-06-03 11:24:48 +12:00

Merge pull request #2213 from 1995YogeshSharma/doc-1985-update-code-part-getting-started-with-flutter

Issue #1985 - Changes added to getting started with flutter doc
This commit is contained in:
Christy Jacob 2021-11-17 13:39:56 +04:00 committed by GitHub
commit 8e50e5a165
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -58,14 +58,16 @@ For **Windows** add your app <u>name</u> and <u>package name</u>, Your package n
```dart
import 'package:appwrite/appwrite.dart';
Client client = Client();
void main() {
Client client = Client();
client
.setEndpoint('https://localhost/v1') // Your Appwrite Endpoint
.setProject('5e8cf4f46b5e8') // Your project ID
.setSelfSigned() // Use only on dev mode with a self-signed SSL cert
;
client
.setEndpoint('https://localhost/v1') // Your Appwrite Endpoint
.setProject('5e8cf4f46b5e8') // Your project ID
.setSelfSigned() // Use only on dev mode with a self-signed SSL cert
;
}
```
Before starting to send any API calls to your new Appwrite instance, make sure your Android or iOS emulators has network access to the Appwrite server hostname or IP address.
@ -91,25 +93,28 @@ Response user = await account
```dart
import 'package:appwrite/appwrite.dart';
Client client = Client();
void main() {
Client client = Client();
client
.setEndpoint('https://localhost/v1') // Your Appwrite Endpoint
.setProject('5e8cf4f46b5e8') // Your project ID
.setSelfSigned() // Use only on dev mode with a self-signed SSL cert
;
client
.setEndpoint('https://localhost/v1') // Your Appwrite Endpoint
.setProject('5e8cf4f46b5e8') // Your project ID
.setSelfSigned() // Use only on dev mode with a self-signed SSL cert
;
// Register User
Account account = Account(client);
// Register User
Account account = Account(client);
Response user = await account
.create(
email: 'me@appwrite.io',
password: 'password',
name: 'My Name'
);
Response user = await account
.create(
email: 'me@appwrite.io',
password: 'password',
name: 'My Name'
);
}
```
### Error Handling