chargebee_dart 0.0.2 copy "chargebee_dart: ^0.0.2" to clipboard
chargebee_dart: ^0.0.2 copied to clipboard

discontinued
outdatedDart 1 only

A wrapper for chargebee js

chargebee_dart #

A Dart wrapper for the Chargebee iframe API

Usage #

A simple usage example:

import 'package:chargebee_dart/chargebee_dart.dart';

main() async {
  final loader = await ChargeBee.embed(url, siteName);
  loader.load();
  loader.onAddIframe.then((iframe) {});
  loader.onCancel.then((iframe) {});
  loader.onSuccess.then((iframe) {});
  loader.onLoad.then((dimensions) {
    // dimensions.iframe
    // dimensions.width
    // dimensions.height
  });
  resizeIframeSubscription = _loader.onResize.listen((dimensions) {
    // dimensions.iframe
    // dimensions.width
    // dimensions.height
  });

  ...

  // when done
  loader.dispose();
  resizeIframeSubscription.cancel();
}