appwrite/app/sdks/client-flutter/docs/examples/account/create-verification.md

22 lines
472 B
Markdown
Raw Normal View History

2020-04-10 08:31:49 +00:00
import 'package:appwrite/appwrite.dart';
2020-05-28 04:41:25 +00:00
void main() { // Init SDK
Client client = Client();
Account account = Account(client);
2020-04-10 08:31:49 +00:00
2020-05-28 04:41:25 +00:00
client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
2020-04-10 08:31:49 +00:00
.setProject('5df5acd0d48c2') // Your project ID
2020-05-28 04:41:25 +00:00
;
2020-04-10 08:31:49 +00:00
2020-05-28 04:41:25 +00:00
Future result = account.createVerification(
2020-04-10 08:31:49 +00:00
url: 'https://example.com',
2020-05-28 04:41:25 +00:00
);
2020-04-10 08:31:49 +00:00
2020-05-28 04:41:25 +00:00
result
.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}