dart_appwrite 11.0.2 copy "dart_appwrite: ^11.0.2" to clipboard
dart_appwrite: ^11.0.2 copied to clipboard

Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API

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);

User result = await users.create(
    userId: ID.unique(),
    email: "email@example.com",
    phone: "+123456789",
    password: "password",
    name: "Walter O'Brien"
);

Fetch user profile:

Users users = Users(client);

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

Upload File:

Storage storage = Storage(client);

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

storage.createFile(
    bucketId: '[BUCKET_ID]',
    fileId: '[FILE_ID]', // use 'unique()' to automatically generate a unique ID
    file: file,
    permissions: [
      Permission.read(Role.any()),
    ],
)
.then((response) {
    print(response); // File uploaded!
})
.catchError((error) {
    print(error.response);
});

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

92
likes
120
pub points
92%
popularity

Publisher

verified publisherappwrite.io

Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API

Homepage
Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

License

BSD-3-Clause (LICENSE)

Dependencies

http

More

Packages that depend on dart_appwrite