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

retracted

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/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);
              }),
        ),
      ),
    );
  }
}