fluidcoins 0.2.0 copy "fluidcoins: ^0.2.0" to clipboard
fluidcoins: ^0.2.0 copied to clipboard

Accept 10+ cryptocurrencies from customers anywhere in the world using FluidCoins.

fluidcoins #

This is a flutter library to accept payments using Fluidcoins.

Try the demo #

Checkout the widget flow to view how the Fluidcoins Widget works. Click "Try Demo"

Getting started #

Add the dependency fluidcoins: ^0.1.0 to your project.

On iOS, opt-in to the embedded views preview by adding a boolean property to the app's Info.plist file with the key io.flutter.embedded_views_preview and the value true.

<dict>  
  <key>io.flutter.embedded_views_preview</key>
  <true/>  
</dict>

Usage #

import 'package:fluidcoins/fluidcoins.dart';

final fluidcoins = FluidCoins(
  apiKey: 'YOUR_API_KEY',
);

main() async {
  final res = await fluidcoins.open(
    context,
    email: 'john@example.net',
    amount: 100000,
  );

  if (res == null) {
    print('payment was cancelled');
    return;
  }

  if (res.hasError) {
    print(res.error);
  }

  if (res.isPaidInFull || res.isOverPaid) {
    ScaffoldMessenger.of(context).showSnackBar(
      SnackBar(
        content: Text('Payment successful'),
      ),
    );

    print('Payment successful');
    print(res.coin);
    print(res.amount);
    print(res.reference);
  }
}
6
likes
140
pub points
0%
popularity

Publisher

verified publisherdjade.net

Accept 10+ cryptocurrencies from customers anywhere in the world using FluidCoins.

Repository (GitHub)
View/report issues

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

flutter, webview_flutter

More

Packages that depend on fluidcoins