Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bicho19/feather-client-flutter

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flutter Feather Client Plugin

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 👋

Available Features

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

Getting Started

dependencies:
  ...
  feather_client_flutter: 

Usage example

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

Error handling

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.

Supported authentication methods

  • Email and Password
  • Anonymously (To be added later)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.