Flutter Pluggy Connect SDK

Flutter bindings for our Pluggy Connect widget.

Requirements

  • Dart sdk: ">=2.17.0 <4.0.0"
  • Flutter: ">=3.0.0"
  • Android: minSdkVersion >= 19, compileSdk >= 34, AGP version >= 7.3.0 (use Android Studio - Android Gradle plugin Upgrade Assistant for help), support for androidx (see AndroidX Migration to migrate an existing app)
  • iOS 9.0+: --ios-language swift, Xcode version >= 14.3
  • MacOS 10.11+: Xcode version >= 14.3

If your app doesn't meet those requirements, please use the 1.5.0 version

Setup

dart pub add flutter_pluggy_connect

Additional Android setup

  • Add the following permission in your AndroidManifest.xml if you don't have it:
<uses-permission android:name="android.permission.INTERNET"/>

Basic Usage

import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter_pluggy_connect/flutter_pluggy_connect.dart';

void main() {
  runApp(
    MaterialApp(
        home: Scaffold(
            body: PluggyConnect(connectToken: '<connect token>'))),
  );
}
  • A full working example is available in the example folder.

Oauth Support

To fully support Oauth you need to follow the following guide: https://docs.pluggy.ai/docs/oauth-support-guide

Configurations

The available configuration parameters are the following:

Parameter Description Required? Type Default
connectToken Your Pluggy Connect token, which will be used to access the API. ✅ String N/A
includeSandbox Whether to display Sandbox connectors in the Connector selection step (not intended for production use) ❌ bool false
updateItem Item id to update. If specified, the modal will display directly the credentials form of the item to be updated. ❌ String N/A
connectorTypes List of Connector Types. If defined, only Connectors of the specified connector types will be listed. ❌ List<String> N/A
connectorIds List of Connector IDs. If defined, only Connectors of the specified connector IDs will be listed. ❌ List<int> N/A
countries List of country codes (ISO-3166-1 alpha 2 format). If defined, only Connectors of the specified countries will be listed. ❌ List<String> N/A
language Language ISO String (2-letter) used to display the widget. If not specified, or if the selected language is not supported, the default 'pt' will be used. ❌ String Browser language
onSuccess Function to execute when an Item has been created/updated successfully. ❌ void Function(dynamic data) No op
onError Function to execute on a general error loading the widget, or when an Item creation/update status has not been successful. ❌ void Function(dynamic error) No op
onOpen Function to execute when the widget modal has been opened. ❌ VoidCallback No op
onClose Function to execute when the widget modal has been closed. ❌ VoidCallback No op
onEvent Function to execute to handle custom user interaction events. See the docs for more info. ❌ Since v2.0.0:
void Function(dynamic payload)
Until 1.x:
void Function(String event, dynamic metadata)
No op
selectedConnectorId If defined and connector is present, after accepting terms, it'll navigate to Connector login form directly, skipping selection step. ❌ int N/A

See our official Pluggy Connect widget documentation for more detailed information.