createTransaction static method

Future createTransaction(
  1. int transactionUuid,
  2. int userId,
  3. int companyId,
  4. String authorizationMethod,
)

Implementation

static Future<dynamic> createTransaction(int transactionUuid, int userId,
    int companyId, String authorizationMethod) async {
  try {
    final result = await _channel.invokeMethod('updateTransaction', {
      'transactionUuid': transactionUuid,
      'userId': userId,
      'companyId': companyId,
      'authorizationMethod': authorizationMethod
    });

    final jsonResult = json.decode(result);
    final transaction = Transaction.fromJson(jsonResult);

    return transaction;
  } on PlatformException catch (exception) {
    print(exception);
  }
}