To use this plugin, add plugpag_flutter
as a dependency in your pubspec.yaml
file like this
dependencies:
plugpag_flutter:
This will get you the latest version.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="YOUR_PACKAGE_NAME"
// Add this line below
xmlns:tools="http://schemas.android.com/tools">
...
</manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="YOUR_PACKAGE_NAME"
xmlns:tools="http://schemas.android.com/tools">
<application
android:label="YOUR_ANDROID_LABEL"
// Add this line below (after android:label)
tools:replace="android:label"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
...
</application>
</manifest>
defaultConfig {
...
minSdkVersion 21
...
}
dependencies {
...
implementation 'android.br.com.uol.pagseguro:plugpag:4.9.4'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.4.0'
}
🚧 Under development 🚧
To start using this package first import it in your Dart file.
import 'package:plugpag_flutter/plugpag_flutter.dart';
Initialize
var plugpag = PlugpagFlutter(onState: onState);
Basic example using it:
var plugpag = PlugpagFlutter(onState: (state) {});
await plugpag.requestPermissions();
await plugpag.requestAuthentication();
await plugpag.startTerminalDebitPayment(2.00);