create static method

Future<Payment> create({
  1. required MethodChannel channel,
  2. required String licenceKey,
  3. String licenceInternalKey = licenceCheck,
})

Implementation

static Future<Payment> create({
  required MethodChannel channel,
  required String licenceKey,
  String licenceInternalKey = licenceCheck,
}) async {
  if (_instance == null) {
    _instance = Payment._(
      channel: channel,
      licenceKey: licenceKey,
      licenceInternalKey: licenceInternalKey,
    );
  } else {
    _instance!._updateLicenceKeys(licenceKey, licenceInternalKey);
  }

  await _instance!._scheduleLicenceSync();
  return _instance!;
}