简体   繁体   中英

How can I pass data from one app to another app in flutter?

I am developing an app in which payment automation is an functionality. What is required is that Account details need to be filled by my app, so that no need of manual typing. I know I can open app using url_launcher package, but I don't know how to pass data? and how to map data with the different textfield of the selected app.

I am going to consider any UPI enabled payment application here and you want to pass data like reciever name, upi ID, total amount and a transactional note.

Future<UpiResponse> initiateTransaction(UpiApp app) async {
    return _upiIndia.startTransaction(
      app: app,
      receiverUpiId: "9078600498@ybl",
      receiverName: 'Md Azharuddin',
      transactionRefId: 'TestingUpiIndiaPlugin',
      transactionNote: 'Not actual. Just an example.',
      amount: 1.00,
    );
  }

You can use upi_india but this is not limited to just upi_india. You have other packages like stripe and flutter pay which also has similar functionality

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM