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

outdated

Plaid Link plugin for Flutter.

Plaid Link plugin for Flutter #

A Flutter plugin for Plaid Link.

This plugin integrates the native SDKs:

Note: Feedback and Pull Requests are most welcome!

Installation #

  dependencies:
    plaid_flutter: ^0.1.0

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. Add the LinkActivity activity and plaid_public_key metadata element to your AndroidManifest.xml within the application tag.
<application>

  // ...

  <activity android:name="com.plaid.link.LinkActivity" />

  <meta-data android:name="com.plaid.link.public_key"
             android:value="@string/plaid_public_key" />

</application>
  1. Add your plaid public key from the Plaid Dashboard to the donottranslate.xml file
<string name="plaid_public_key">PUBLIC_KEY</string>
  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
      oauthRedirectUri: "myapp://test", //required for android
      oauthNonce: "XXXXXXXXXXXXXXXX",   
      env: EnvOption.sandbox,
      products: <ProductOption>[
        ProductOption.auth,
      ],
      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.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on plaid_flutter