with Flutter:

$ flutter pub add flutter_fuse_connect

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

	flutter_fuse_connect: ^1.0.1

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

Import it

Now in your Dart code, you can use:

import 'package:flutter_fuse_connect/fuse_connect.dart';


final fuseConnect = FuseConnect(
    onSuccess: (publicToken) {
    // Handle callback
    onExit: (err, metadata) {
    // Handle callback
    onInstitutionSelected: (institutionId, callback) {
    // Handle callback

Class arguments

onInstitutionSelectedFunctionYesA function that is called when a user selects an institution to link. The function expects one parameter:

institution_id - Represents the unique identifier for the selected bank.

callback - Receives the link token generated by the backend. See /link/token for how to generate a link token.
onSuccessFunctionYesA callback function that is called when the user successfully connects their bank account. The function takes one parameter:

public token - A temporary token that can be exchanged for an access token to access the user's bank data. See /financial_connections/public_token/exchange
onExitFunctionYesA callback function that is called when the user exits the API. The function takes two parameters:

err - An error object, if an error occurred during the connection process.

metadata - contains additional information about the connection, such as the bank name and institution ID.

Open parameters

clientSecretStringYesA string representing the generated client secret. This secret is used to authenticate the API and grant access to bank data. See /session