plaid_flutter 0.2.1 copy "plaid_flutter: ^0.2.1" to clipboard
plaid_flutter: ^0.2.1 copied to clipboard

outdated

Plaid Link plugin for Flutter. Integrates the native iOS and Android SDKs.

Plaid Link plugin for Flutter #

pub

A Flutter plugin for Plaid Link.

This plugin integrates the native SDKs:

Note: Feedback and Pull Requests are most welcome!

Installation #

Add plaid_flutter as a dependency in your pubspec.yaml file.

iOS #

  1. Add a Run Script build phase (name it Prepare for Distribution for example) with the script below. Be sure to run this build phase after the Embed Frameworks build phase (or [CP] Embed Pods Frameworks build phase when integrating using CocoaPods)
LINK_ROOT=${PODS_ROOT:+$PODS_ROOT/Plaid}
cp "${LINK_ROOT:-$PROJECT_DIR}"/LinkKit.framework/prepare_for_distribution.sh "${CODESIGNING_FOLDER_PATH}"/Frameworks/LinkKit.framework/prepare_for_distribution.sh
"${CODESIGNING_FOLDER_PATH}"/Frameworks/LinkKit.framework/prepare_for_distribution.sh

NOTE: More info at https://plaid.com/docs/link/ios.

Android #

  1. Log into your Plaid Dashboard at the API page and add a new Allowed Android package name (for example com.plaid.example) and a new Allowed redirect URI.

NOTE: More info at https://plaid.com/docs/link/android.

Usage Example #

import 'package:plaid_flutter/plaid_flutter.dart';

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {

  PlaidLink _plaidLink;
  
  @override
  void initState() {
    super.initState();
  
    _plaidLink = PlaidLink(
      clientName: "CLIENT_NAME",        //required
      publicKey: "PUBLIC_KEY",          //required
      env: EnvOption.sandbox,           //required
      products: <ProductOption>[        //required
        ProductOption.auth,
      ],
      oauthRedirectUri: "myapp://test",
      oauthNonce: "XXXXXXXXXXXXXXXX",   
      onAccountLinked: (publicToken, metadata) { print("onAccountLinked: $publicToken metadata: $metadata"); },
      onAccountLinkError: (error, metadata) { print("onAccountError: $error metadata: $metadata"); },
      onEvent: (event, metadata) { print("onEvent: $event metadata: $metadata"); },
      onExit: (metadata) { print("onExit: $metadata"); },
    );
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: 
        Center( 
            child: 
            RaisedButton(
              onPressed: () {
                _plaidLink.open();
              },
              child: Text("Open Plaid Link"),
          	),
        ),
      ),
    );
  }
}

TODOs #

76
likes
0
pub points
94%
popularity

Publisher

unverified uploader

Plaid Link plugin for Flutter. Integrates the native iOS and Android SDKs.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on plaid_flutter