flutter_nexi 1.0.0
flutter_nexi: ^1.0.0 copied to clipboard
Unofficial Flutter plugin for integrating Nexi/XPay payments on Android and iOS.
import 'package:flutter/material.dart';
import 'package:flutter_nexi/flutter_nexi.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
final _flutterNexiPlugin = FlutterNexi(secretKey: 'secret_key');
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: const Text('Plugin example app')),
body: Center(
child: FilledButton(
onPressed: () {
_flutterNexiPlugin.pay(
alias: 'alias',
codTrans: 'codTrans',
amount: 1000,
currency: 'EUR',
);
},
child: Text('Pay'),
),
),
),
);
}
}