flutter_adyen_dropin_plugin 0.1.2 copy "flutter_adyen_dropin_plugin: ^0.1.2" to clipboard
flutter_adyen_dropin_plugin: ^0.1.2 copied to clipboard

Flutter plugin to integrate Adyen DropIn

example/lib/main.dart

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_adyen_dropin_plugin/flutter_adyen_dropin_plugin.dart';

void main() {
  runApp(const MyApp());
}

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: CupertinoButton(
              child: const Text("Drop In"),
              onPressed: () async {
                String dropInStatus = '';
                try {
                  dropInStatus = await FlutterAdyenDropIn.openDropIn(
                    sessionData: "<YOUR-SESSION-DATA>",
                    clientKey: "<YOUR-CLIENT-KEY>",
                    currency: "USD",
                    value: 1000,
                    sessionId: "<YOUR-SESSION-ID>",
                    countryCode: "en-US",
                    sessionInfo: {"FIELD": "<YOUR-SESSION-INFO>"},
                  );
                } catch (e) {
                  print(e);
                }
                print(dropInStatus);
              }),
        ),
      ),
    );
  }
}
7
likes
140
points
23
downloads

Publisher

verified publisherjosephnguyen.online

Weekly Downloads

Flutter plugin to integrate Adyen DropIn

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on flutter_adyen_dropin_plugin