I am designing a Flutter app that pulls an inventory list from 2 big-box stores and displays the recommended products to the user. I received a sample Node.js script from Store 1 that requires node-RSA key authentication to make API calls. I was able to get it to work in Node.js but have not yet figured out how to use it in Flutter. The second Store requires a username and password to access the API. I was able to make this one work in Flutter.
Dilemma: I was advised that it will be difficult to make the Nodejs code work inside my Flutter app and the best practice is to Build A Restful API With Node.js and use a service like Heroku to handle the API calls to both store, process (combined) the JSON responses and to just have my Flutter app send a request to the Node.js server.
But since the Flutter app would have to send requests to the "Heroku" server and the server also have to go fetch my data, wouldn't that make the app run slower than figuring out a way to make the calls directly inside the app and process the data locally?
Please, I am trying to understand which practice is most recommended and see if there is a way to use the Nodejs function inside Dart.