fusionauth_dart_client 1.17.0-beta

  • Readme
  • Changelog
  • Example
  • Installing
  • 56

FusionAuth Dart Client semver 2.0.0 compliant #

If you're integrating FusionAuth with a Dart or Flutter application, this library will speed up your development time.

For additional information and documentation on FusionAuth refer to https://fusionauth.io.

A library for FusionAuth Dart developers.


Beta notice #

This client is flagged as a beta client due to missing or incomplete features.

Known limitations #

  • The use of some objects are limited due to missing support for dynamic fields (example: custom claims on a jwt). Currently any data placed in json will not render in dart unless the class is explicitly subclassed to contain those fields.

Usage #

A simple usage example:

import 'dart:convert';

import 'package:fusionauth_dart_client/fusionauth_dart_client.dart';

void main() async {
  var client = FusionAuthClient('bf69486b-4733-4470-a592-f1bfce7af580',
      'https://local.fusionauth.io', null);

  var response = await client.searchUsersByQuery(SearchRequest(
      search: UserSearchCriteria(queryString: "email:test@example.com")));

  if (response.successResponse != null) {
    print(json.encode(response.successResponse.users));
  }
}

pubspec.yaml:

dependencies:
  fusionauth_dart_client: ^1.16.0-beta

Features and bugs #

Please file feature requests and bugs at the issue tracker.

1.15.8-beta #

  • First available version

This version contains the full domain but is limited in requests and responses due to missing support for wildcard getters and settings in the json serialization. Some classes may have issues. This client will remain marked as beta until this is remedied.

example/fusionauth_dart_client_example.dart

import 'dart:convert';

import 'package:fusionauth_dart_client/fusionauth_dart_client.dart';

void main() async {
  var client = FusionAuthClient('bf69486b-4733-4470-a592-f1bfce7af580',
      'https://local.fusionauth.io', null);

  var response = await client.searchUsersByQuery(SearchRequest(
      search: UserSearchCriteria(queryString: "email:test@example.com")));

  if (response.successResponse != null) {
    print(json.encode(response.successResponse.users));
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  fusionauth_dart_client: ^1.17.0-beta

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:fusionauth_dart_client/fusionauth_dart_client.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
19
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
85
Overall:
Weighted score of the above. [more]
56
Learn more about scoring.

We analyzed this package on Jul 11, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.14

Analysis suggestions

Package not compatible with runtime flutter-web on web

Because:

  • package:fusionauth_dart_client/fusionauth_dart_client.dart that imports:
  • package:fusionauth_dart_client/src/FusionAuthRESTClient.dart that imports:
  • dart:io

Package not compatible with runtime js

Because:

  • package:fusionauth_dart_client/fusionauth_dart_client.dart that imports:
  • package:fusionauth_dart_client/src/FusionAuthRESTClient.dart that imports:
  • dart:io

Health suggestions

Format lib/src/FusionAuthClient.dart.

Run dartfmt to format lib/src/FusionAuthClient.dart.

Format lib/src/FusionAuthDomain.dart.

Run dartfmt to format lib/src/FusionAuthDomain.dart.

Format lib/src/FusionAuthRESTClient.dart.

Run dartfmt to format lib/src/FusionAuthRESTClient.dart.

Maintenance suggestions

The package description is too short. (-8 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is pre-release. (-5 points)

Pre-release versions should be used with caution; their API can change in breaking ways.

Update README.md. (-2 points)

1 image link is insecure (e.g. http://img.shields.io/badge/semver-2.0.0-brightgreen.svg?style=flat-square), use https URLs instead.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
json_annotation ^3.0.1 3.0.1
Dev dependencies
build_runner ^1.8.0
json_serializable ^3.3.0
pedantic ^1.8.0
test ^1.6.0