callSdk static method

Future<Object?> callSdk(
  1. BuildContext context, {
  2. required String merchantCode,
  3. required String merchantName,
  4. required String merchantUrl,
  5. required String amount,
  6. required String refId,
  7. required String module,
  8. required String user,
  9. required String password,
  10. String? customerName,
  11. required String deliveryUrl,
  12. required BuildType buildType,
  13. String? userAssetImage,
})

Implementation

static Future<Object?> callSdk(
  BuildContext context, {
  required String merchantCode,
  required String merchantName,
  required String merchantUrl,
  required String amount,
  required String refId,
  required String module,
  required String user,
  required String password,
  String? customerName,
  required String deliveryUrl,
  required BuildType buildType,
  String? userAssetImage,
}) async {
  _finalResult = null;
  ApiConstants.buildType = buildType;

  String m = base64.encode(utf8.encode(module));

  RequestModel requestModel = new RequestModel(
      merchantName: merchantName,
      merchantCode: merchantCode,
      merchantUrl: merchantUrl,
      amount: amount,
      refId: refId,
      module: m,
      customerName: customerName,
      user: user,
      password: password,
      deliveryUrl: deliveryUrl,
      logo: userAssetImage);

  await Navigator.push(
    context,
    MaterialPageRoute(builder: (context) => PhoneNumberScreen(requestModel)),
  );

  return _finalResult;
}