flutter_pluggy_connect 3.0.1 copy "flutter_pluggy_connect: ^3.0.1" to clipboard
flutter_pluggy_connect: ^3.0.1 copied to clipboard

Pluggy Connect SDK for Flutter.

example/lib/main.dart

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

class HomePageState extends State<HomePage> {
  bool _showPluggyConnect = false;

  void _togglePluggyConnect() {
    setState(() {
      _showPluggyConnect = !_showPluggyConnect;
    });
  }

  @override
  Widget build(BuildContext context) {
    return PluggyConnect(
      includeSandbox: true,
      onSuccess: (data) {
        print('Success');
        print(jsonEncode(data));
      },
      onClose: () {
        print('Closed');
        _togglePluggyConnect();
      },
      onError: (error) {
        print('Error');
        print(jsonEncode(error));
      },
      onOpen: () {
        print('Opened');
      },
      onEvent: (payload) {
        print('Event');
        print(jsonEncode(payload));
      },
      connectToken: '<YOUR_CONNECT_TOKEN>',
    );
  }
}

class HomePage extends StatefulWidget {
  const HomePage({super.key});

  @override
  HomePageState createState() => HomePageState();
}

void main() {
  runApp(
    MaterialApp(
        home: Scaffold(
            appBar: AppBar(backgroundColor: Colors.black, toolbarHeight: 1),
            body: const HomePage())),
  );
}
2
likes
130
points
1.07k
downloads

Publisher

verified publisherpluggy.ai

Weekly Downloads

Pluggy Connect SDK for Flutter.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

app_links, flutter, url_launcher, webview_flutter

More

Packages that depend on flutter_pluggy_connect