beta_test_apw 0.1.0 copy "beta_test_apw: ^0.1.0" to clipboard
beta_test_apw: ^0.1.0 copied to clipboard

demo

example/README.md

Examples #

Init your Appwrite client:

  Client client = Client();

  client
      .setEndpoint('https://localhost/v1') // Your Appwrite Endpoint
      .setProject('5e8cf4f46b5e8') // Your project ID
      .setSelfSigned() // Remove in production
  ;

Create a new user:

Users users = Users(client);

Response result = await users.create(
    email: 'email@example.com',
    password: 'password',
);
 

Fetch user profile:

Users users = Users(client);

Response profile = await users.get(
    userId: '[USER_ID]',
);

Upload File:

Storage storage = Storage(client);

MultipartFile file = MultipartFile.fromFile('./path-to-file/image.jpg', filename: 'image.jpg');

storage.createFile(
    file: file,
    read: ['*'],
    write: []
)
.then((response) {
    print(response); // File uploaded!
})
.catchError((error) {
    print(error.response);
});

All examples and API features are available at the official Appwrite docs