A Flutter plugin to use the Feather API.
Note: This plugin is still under development, and some APIs might not be available yet. Feedback and Pull Requests are most welcome!
Have any questions? Join Feather Discord 👋
| Feature | Status |
|---|---|
| Create a credential (Email and password) | ✅ |
| Create a credential (Email verification - passwordless -) | ⚙️ |
| Update a credential | ⚙️ |
| Update a credential password | ⚙️ |
| Creates a user | ✅ |
| Retrieve a user | ⚙️ |
| Update a user | ⚙️ |
| Update a user's email | ⚙️ |
| Refresh a user's tokens | ⚙️ |
| Revoke a user's tokens | ⚙️ |
- ✅ Done
- ⚙️ Under development
dependencies:
...
feather_client_flutter: The Feather plugin must be initialized with your project's API key, available on the Feather Dashboard.
Add the following imports to your Dart code:
import 'package:feather_client_flutter/feather_client_flutter.dart';Initialize FeatherClient :
FeatherClient featherClient = FeatherClient(apiKey: "YOUR_API_KEY");To sign in:
featherClient
.newCurrentCredential(email: "test5@test.com", password: "password")
.then((credential) {
if (credential.status == "valid") {
featherClient.newCurrentUser(token: credential.token).then((featherUser) {
print("User id : ${featherUser.id}");
}).catchError((error) {
// Handle errors
print(error.toString());
}
}
);
}).catchError((error) {
// Handle errors
print(error.toString());
});If a method fails it will throw a FeatherException with the error code as a string.
So make sure to wrap your calls with a try..catch or add a .catchError functions.
Check the source comments to see which error codes each method could throw.
- Email and Password
- Anonymously (To be added later)